Skip to main content
Token Bridge·v0.2.0 · development build

Figma variables and the token files, in sync.

Token Bridge is a Figma plugin that pulls the token files in @wyliedog/tokens into Figma Variables and pushes your edits back to GitHub, either as a direct commit or as a pull request.

Collections it syncs

  • primitive286 tokens · Value
  • semantic102 tokens · Light, Dark
  • components1132 tokens · Light, Dark

1,520 tokens total

How it works

Five steps from the repository to Figma and back

  1. 01

    Install the plugin in Figma

    Token Bridge is a Figma plugin. Build it from apps/figma-plugin, then in the Figma desktop app choose Plugins, Development, Import plugin from manifest, and select manifest.json.

  2. 02

    Connect a GitHub repository

    Enter the owner, repository, branch and the folder that holds the token files (here, packages/tokens/io/sync), plus a GitHub personal access token with the repo scope, or Contents read and write for a fine-grained token. The token is stored per Figma user and is never written into the file.

  3. 03

    Pull tokens into Figma

    Pull reads the token files from GitHub, or import a file from disk. The format is detected automatically and a summary is shown before anything changes. The 1,520 tokens become three variable collections: primitive, semantic and components.

  4. 04

    Edit variables in Figma

    Designers work with the real token names. Semantic and component collections carry a Light and a Dark mode, matching the token files.

  5. 05

    Push back to the repository

    Select collections and push. In direct mode the files are committed to the configured branch; in pull-request mode they go to a new branch and a pull request opens. If the remote changed too, each conflict is shown and you keep the Figma value or take the GitHub value, one by one or in bulk.

What syncs

Three files, three collections

File in packages/tokens/io/syncCollectionTokensModesHolds
primitive.jsonprimitive286ValueRaw values: color scales in OKLCH, spacing, type, radius, shadow and motion scales.
semantic.jsonsemantic102Light, DarkRole-based aliases in three groups: background, foreground and border, with tones for primary, danger, success and warning.
components.jsoncomponents1132Light, DarkComponent-scoped tokens that alias the semantic collection.

Light and dark

Both modes live in the semantic collection

These values are read from the built token CSS, so this table changes when the tokens do.

TokenLightDark
--color-background-defaultoklch(0.991 0.003 264.36)oklch(0.138 0.008 60.23)
--color-foreground-defaultoklch(0.202 0.011 47.84)oklch(0.977 0.003 65.02)
--color-background-primaryoklch(0.508 0.139 37.8)oklch(0.508 0.139 37.8)
--color-border-defaultoklch(0.74 0.019 69.96)oklch(0.397 0.018 63.78)
--color-foreground-success-mutedoklch(0.488 0.134 150.16)oklch(0.714 0.182 151.81)

Worth knowing

What it does and does not do

Unsupported variables are listed, not exported
Native EASING and TIMING variables, composed colors, and anything that aliases them cannot be exported yet. After an export or push, a notice lists what was skipped and why.
Tokens stay out of the file
The GitHub token lives in Figma's per-user storage. The file's plugin data holds only the repository settings, so a shared or duplicated file does not carry a credential.
Formats it can read
W3C DTCG, Tokens Studio, Style Dictionary (flat and nested) and the native format used by this repository. Export always writes the native format, one JSON file per collection.
Narrow network access
The plugin manifest allows only api.github.com, raw.githubusercontent.com and Google Fonts.

GitHub is the only supported provider, and a personal access token is the only sign-in method.

Keep design and code on the same tokens.