Skip to content

Clone tokens from Figma to a JSON file, then parse to CSS files

Notifications You must be signed in to change notification settings

osmarpetry/tokens-figma-node

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Why I created this project?

I want to have a parser to get design tokens from Figma. I caught the code to parse the code from Figma from Design Tokens with Figmna (the code's author knows).

Then I caught this Object then copied to output/tokens.json. After it, I parsed the code to separated CSS files with the CSS variables for each Design Token.

With that, I can easily update de CSS variables to SASS, CSS and styled-components. In that way, I can easily update my design tokens on my project.

How to use

Today I don't have a NodeJS CLI, so you should go to index.js replace figmaApiKey with your personal Figma key and the figmaId from your Id file Figma.

You can see an example of a Figma project here.

About

Clone tokens from Figma to a JSON file, then parse to CSS files

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published