Web Design

Adopting Figma variables for a cross-platform design token workflow

DSN

Design tokens, colors, spacing, typography, defined once and shared across design and code, have always sounded better in theory than they worked in practice. The usual failure mode was a spreadsheet or a shared document that both design and engineering were supposed to keep in sync manually, which worked for about as long as everyone remembered to update both places, meaning not very long at all once a project had more than a couple of active contributors. Figma's variables feature this year closed a real gap in that workflow by giving both sides a shared source of truth that lives inside the actual design tool rather than beside it.

Exporting variables directly into our Tailwind config removed a manual sync step that used to drift out of date within a month of every project kicking off. Colors and spacing values defined as Figma variables map fairly directly onto Tailwind's theme extension format, and a small export script, run as part of our project setup rather than fully automated end to end, converts a project's variable collection into the corresponding Tailwind config values in a fraction of the time the manual transcription used to take.

The workflow isn't without rough edges. Figma's variable modes, useful for handling light and dark theme variants within a single set of token names, don't map onto Tailwind's configuration format as cleanly, and we still hand-adjust the dark mode token exports rather than trusting the automated conversion for that part. Typography tokens, font size, line height, and weight bundled together as a single named style, also needed more manual translation than color and spacing did, since Tailwind's typography utilities don't group those three properties under one token name the way Figma's text styles do natively.

It's not a fully automated pipeline yet, but it's close enough to trust for the pieces that do translate cleanly, and it's already prevented the specific, familiar failure mode of a design update quietly not making it into the codebase for weeks. Designers now think of the variable panel as the actual source of truth rather than a visual reference to be manually re-keyed by an engineer, which is the cultural shift that matters more than the specific export tooling.

Getting there required some upfront cleanup that's worth naming honestly, since it's the part of this kind of adoption that's easy to underestimate. Several existing projects had accumulated near-duplicate color values, three or four shades of what was meant to be a single brand blue, created at different points by different designers without a shared token system to prevent drift. Consolidating those into a single canonical set of variables before starting the export workflow took longer than setting up the export tooling itself, but it was necessary groundwork; exporting a messy, duplicated set of design values would have just moved the drift problem into the codebase rather than solving it.

We also had to agree on a naming convention between design and engineering before the export process could be reliable, since Figma's variable names needed to map predictably onto Tailwind's config keys without a developer manually renaming things on every export. Settling on a shared naming scheme, closely mirroring Tailwind's own semantic naming patterns rather than Figma's more visually descriptive defaults, took a couple of rounds of back-and-forth between design and engineering, but it's paid for itself on every project since by keeping the export genuinely close to a one-step process rather than one requiring a manual translation pass each time.

← Back to the journal

Have a project in mind?
Let’s talk.

Tell us where you are and where you want to go. We'll map the fastest route between the two.

Currently accepting new clients