-
In this project, we will see how FIGMA Variables (that stores design tokens) are exported from FIGMA to Code using FIGMA API and Style-Dictionary
-
FIGMA is considered as source of truth
- FIGMA: FIGMA Variables API only available for Enterprise Account with Editor Access
- StyelDictionary: Allows us to transform our design tokens into various formats.
- Create a new personal access token - Settings -> "Personal Access Tokens"
- Identify the "fileKey" value for the specific design system from where we want to export FIGMA Variables
- Run the following command: curl -H 'X-FIGMA-TOKEN: ' 'https://api.figma.com/v1/files/:file_key/variables/local'
- This generates a JSON-version of FIGMA Variables
To-be-expanded
To-be-expanded
npm run build