66
GitHub - jxnblk/figma-theme: Generate development-ready theme JSON files from Fi...
source link: https://github.com/jxnblk/figma-theme
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
README.md
figma-theme
Generate development-ready theme JSON files from Figma Styles
- Parse Styles from a Figma file ID
- Works with Styled System and other CSS-in-JS setups
- Built with figma-js
npm i figma-theme
Getting Started
- Install
figma-theme
as a dev dependency in your project - Get a personal access token for the Figma API
- Create a
.env
file with your access token
FIGMA_TOKEN=<personal-access-token>
- Alternatively add an environment variable for
FIGMA_TOKEN
- Add an npm run script:
figma-theme <figma-file-id>
- Run the script to create a
theme.json
file based on Figma Styles
Options
Options can be passed as CLI flags or included in a figma-theme
object in your package.json
--out-dir
: output directory (default current working directory)--metadata
: include additional metadata from the Figma API
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK