fgr-design-tokens
v0.0.8
Published
Figure design tokens
Readme
Convert tokens and export them as a package for use.
Setup
Install Style Dictionary npm install -g style-dictionary
Token Export and Conversion
Export Figma Variables to .json (WC3 format) using a plugin such as Design Tokens.
Convert tokens to platform-specific formats using command
style-diciontary buildIncrease the package version in package.json file (follow best practices for semantic versioning).
Publish the package with
npm publish
Using tokens in React
Install the package with npm install fgr-design-tokens
Get the latest version with npm update (make sure to set "fgr-design-tokens" in package.json to "latest")
Import token like this:
import { TokenName } from 'fgr-design-tokens/fds_tokens'
Trouble using the package in a React project?
Try adding the following line to .d.ts file declare module "tokens";
