Docs / Integrations
Tokens Studio
Tokens Studio (formerly Figma Tokens) can import the W3C DTCG output from the DESIGN.md CLI. Connect it to a GitHub repository and your design tokens stay in sync across code and Figma automatically.
Step 1 — Export from DESIGN.md
Run the CLI export command to generate a DTCG-format token file:
npx @google/design.md export --format dtcg DESIGN.md
# outputs: tokens.jsonCommit tokens.json to your repository so it can be synced via the GitHub integration in the next step.
Step 2 — Connect Tokens Studio to GitHub
Tokens Studio supports syncing a token file directly from a GitHub repository. This means every time you update DESIGN.md and regenerate tokens.json, Figma designers can pull the latest tokens with one click.
- Open Tokens Studio in Figma (Plugins → Tokens Studio for Figma).
- Go to Settings → Sync Providers and choose GitHub.
- Enter your repository, branch, and the path to
tokens.json. - Generate a GitHub personal access token with repo read permission and paste it into the plugin.
- Click Save. Tokens Studio will pull the current token file immediately.
Updating tokens after a DESIGN.md change
The recommended workflow for propagating a token change:
# 1. Edit your DESIGN.md
# 2. Validate the change
npx @google/design.md lint DESIGN.md
# 3. Regenerate the token file
npx @google/design.md export --format dtcg DESIGN.md
# 4. Commit and push
git add tokens.json
git commit -m "chore: sync design tokens from DESIGN.md"
git push
# 5. In Figma → Tokens Studio → pull from GitHubToken group mapping
The DTCG export maps DESIGN.md token categories to Tokens Studio groups as follows:
colorscolortypography.*typographyspacingspacingroundedborderRadiuscomponents.*compositionApplying tokens to Figma components
Once tokens are loaded in Tokens Studio, select any Figma layer and use the plugin’s inspector to assign token values. Tokens Studio maps token types to the correct Figma properties:
colortokens → Fill, Stroke, and Effect colorsspacingtokens → Auto-layout padding and gapborderRadiustokens → Corner radiustypographytokens → Text style (font, size, weight, line height)