Insights

Design Tokens: One Source of Truth for Design and Code

Colors, spacing, and type drift apart when Figma and the codebase each keep their own copy. How we set up design tokens as one source of truth, so design and engineering stay in sync as the product grows.

Design tokens are the least glamorous part of a design system and one of the most useful. They are the named values behind your interface: the colors, spacing steps, type sizes, and radii, stored once and referenced everywhere instead of retyped by hand in each place.

The problem they solve

Without tokens, your brand blue lives in a Figma style, again in a CSS file, and maybe a third time in a component someone hard-coded at 2am. Change the blue and you are hunting for every copy. Miss one and the product looks subtly broken. The values drift because nothing keeps them in agreement.

One source, many outputs

A token is just a name pointing at a value: color-primary is this specific blue, space-4 is this specific gap. You define it once, and both the design tool and the code read from that definition. Update the token and everything referencing it moves together, in Figma and in the running product.

This is where design and engineering stop drifting apart. The designer picks from the same named steps the code uses, so no one is translating a hex code out of a mockup and hoping it matches. The mockup and the build speak the same vocabulary.

Start small

You do not need a token pipeline to begin. Start with the values you reuse most:

  • Color: your core palette and its semantic roles (primary, background, border).
  • Spacing: a small scale you actually stick to, not arbitrary pixels.
  • Type: a handful of sizes and weights.

Name them clearly, use the names everywhere, and resist inventing a one-off value when a token is close enough. That discipline is most of the benefit. As the product grows you can automate the handoff so a single change flows to design and code at once, but the habit matters more than the tooling. Tokens are how a design system stays true once real people start building on it.

All insights