Installation
npm install --save-dev @mrzr/figma-tokens# orpnpm add --save-dev @mrzr/figma-tokensyarn add --dev @mrzr/figma-tokensWithout installing it:
npx @mrzr/figma-tokensRequirements
Section titled “Requirements”| Node.js | 22 or newer. The package declares "engines": { "node": ">=22" } because Style Dictionary 5 requires it. |
| Config | YAML or JSON: figma-tokens.config.yaml, .yml, .json, or an rc file .figma-tokensrc. Never a script. |
| Module type | ESM. The package has "type": "module". |
| Tailwind | Not a dependency. The generated tailwind.css targets v4 and is tested against 4.3.3. tokens.css is plain CSS and needs nothing. |
Dependencies installed with it: style-dictionary (5.x), culori (4.x) and yaml (2.x). There are no peer dependencies.
What you get
Section titled “What you get”| Entry | Use |
|---|---|
figma-tokens (bin) |
The command line, see CLI |
@mrzr/figma-tokens (import) |
generate, write, stale and the config helpers, see API Reference |
import { generate, write } from "@mrzr/figma-tokens";Next: Quick Start.