Design tokens: one source for every design decision
Design tokens are named, platform-agnostic values for design decisions, such as colors, type sizes, spacing, radii and motion timings, stored once and used by design tools and code so a change in one place updates everywhere.
Why design tokens matter
Hard-coded values multiply: the same brand blue typed into a hundred files in four shades. Tokens give each decision one name, such as color-accent or space-4, so theming, dark mode and rebrands become edits to one file instead of a hunt through the codebase.
Tokens are also the most machine-readable part of a brand. The W3C Design Tokens Community Group published the first stable version (2025.10) of its JSON format in October 2025, and tools such as Figma, Framer, Penpot and Style Dictionary support it. That gives AI agents and build tools exact values to use instead of guessing from screenshots.
How we handle it
We define tokens in layers: primitive values (the palette), semantic tokens (text, surface, border, accent) and, where needed, component tokens. In Figma they become variables; in code, CSS custom properties. Names and values match on both sides.
Tokens are the first thing agents read in our process. People decide the token set; after that, agents build with tokens only and check screens for raw values, contrast failures and spacing off the scale. It is part of our design system services, Figma to production code and every website build. Tokens feed the component library and the DESIGN.md that AI coding tools read.
Related service: Design systems · How we work
Design tokens in practice
This site keeps its tokens in one stylesheet as CSS custom properties: background, surface, ink in three strengths, line colors, the green action color, an easing curve and the Geist typefaces. The dark theme and the light theme swap the values under the same names. Components never use a raw hex code, so the theme switch in the header changes every page at once.
Common mistakes
- Naming tokens after their value. A token called blue-500 breaks when the brand turns green. Name semantic tokens by role, such as accent or danger.
- Too many tokens. Hundreds of near-identical values defeat the point. Keep a tight scale and remove unused tokens.
- Tokens only in design files. If code doesn’t consume them, they are documentation. Generate or sync code tokens from one source.
A design token, before and after
Before: a raw value typed into a component. After: the component uses the token, and the value lives in one place.
/* before */ .button { background: #2F5BFF; }
/* after */ .button { background: var(--accent); }The three layers of tokens
| Layer | What it holds | Example name |
|---|---|---|
| Primitive | The raw palette and scales | blue-500 |
| Semantic | A role, pointing at a primitive | color-accent |
| Component | One component’s use of a role | button-background |
Design tokens and CSS variables: the difference
Design tokens are the decisions, stored in a tool-neutral format. CSS custom properties are one way to ship them on the web; the same tokens can also generate iOS, Android or Figma values.
Questions about design tokens
What are design tokens?
What is the difference between design tokens and CSS variables?
Is there a standard format for design tokens?
How should you name design tokens?
color-accent survives a rebrand, blue-500 does not.Do Figma variables count as design tokens?
Thomas OldenburgerFounder, design and build leadStill deciding? A 30-minute call answers most of it.
Related terms
Design system
A design system is the shared source of truth for how a product and its website are designed and built, combining design tokens, a component library, usage rules, content guidelines and a process for changing them.
Definition Design and UXComponent library
A component library is a collection of reusable, documented interface building blocks, such as buttons, inputs, cards and navigation, kept in sync between design files and code so teams assemble screens from tested parts.
Definition BrandBrand guidelines
Brand guidelines are a documented set of rules for how a brand looks, sounds and behaves, covering logo use, color, typography, imagery, layout and tone of voice, so anyone can apply the brand consistently.
Definition AIAI agent
An AI agent is a system in which a large language model plans and carries out a multi-step task on its own, choosing which tools to call, reading the results and deciding what to do next until the goal is met.
Definition