Docs / Integrations
Figma
Export your DESIGN.md tokens to the W3C DTCG format and import them into Figma via the Tokens Studio plugin. This keeps your code tokens and Figma tokens in sync from a single source of truth.
Export to W3C DTCG
The CLI’s export command generates a tokens.jsonfile in the W3C Design Tokens Community Group (DTCG) format — the standard that Figma’s Tokens Studio plugin and the native Figma Variables API consume:
npx @google/design.md export --format dtcg DESIGN.mdThis writes a tokens.json file in the current directory. The output follows the DTCG spec: each token has a $value and $type field, and tokens are grouped by category.
// tokens.json (DTCG format)
{
"color": {
"primary": { "$value": "#1A1C1E", "$type": "color" },
"accent": { "$value": "#B8422E", "$type": "color" },
"surface": { "$value": "#FFFFFF", "$type": "color" }
},
"spacing": {
"sm": { "$value": "8px", "$type": "dimension" },
"md": { "$value": "16px", "$type": "dimension" },
"lg": { "$value": "32px", "$type": "dimension" }
}
}Import into Figma via Tokens Studio
Tokens Studio (formerly Figma Tokens) is the most widely-used plugin for managing design tokens in Figma. Once you have tokens.json, import it directly:
- Install Tokens Studio for Figma from the Figma plugin marketplace.
- Open the plugin in your Figma file (Plugins → Tokens Studio).
- Go to Settings → Token Sources and choose Load from file.
- Select the
tokens.jsonfile exported by the CLI. - Apply the tokens to your Figma components using the plugin’s token inspector.
Export to Tailwind config
If you’re using Tailwind CSS, the CLI can also export your tokens directly to a Tailwind configuration object:
npx @google/design.md export --format tailwind DESIGN.mdThis writes a tailwind.tokens.js file you can spread into your tailwind.config.js theme:
// tailwind.config.js
const tokens = require("./tailwind.tokens.js");
module.exports = {
theme: {
extend: {
colors: tokens.colors,
spacing: tokens.spacing,
borderRadius: tokens.rounded,
},
},
};Google Stitch
Google Stitch — the AI design tool from Google Labs that introduced the DESIGN.md format — has native export support. In Stitch, you can export a complete DESIGN.md directly from a design session without going through the CLI. The exported file is linter-valid and can be used immediately with Claude Code, Cursor, or any other supported tool.