Hard-coded colours and spacing make every redesign a search-and-replace exercise. Well-structured design tokens let one decision flow through every product.
Design tokens are named values for the decisions that make up a visual language: colours, type sizes, spacing, radii, shadows and motion. Instead of #246bfd scattered across hundreds of files, components refer to a token such as color-action-primary.
The benefit isn’t tidiness. It’s that a single decision — a brand refresh, a dark theme, an accessibility fix — can be made once and flow everywhere.
Use three layers
- Primitive tokens describe the raw palette: blue-600, space-4, radius-sm.
- Semantic tokens describe intent: text-muted, surface-raised, action-primary.
- Component tokens are optional overrides for one component: button-padding-x.
Components should almost always use semantic tokens. That is what makes theming possible: a dark theme changes which primitive each semantic token points to, and every component follows.
:root { /* Primitives */ --blue-600: #246bfd; --ink-900: #07111f; --white: #ffffff; /* Semantics — what components use */ --color-action-primary: var(--blue-600); --color-surface: var(--white); --color-text: var(--ink-900);} [data-theme='dark'] { --color-surface: var(--ink-900); --color-text: var(--white);}Tip
Name tokens for what they do, not what they look like. color-text-muted survives a rebrand; color-grey-light does not.
Keep one source of truth
Store tokens in a platform-neutral format such as JSON and generate what each platform needs — CSS custom properties for the web, resources for Android, asset catalogues for iOS. Designers and engineers then work from the same values, and drift becomes visible in code review.
Check accessibility at the token level
Because every text and surface pairing flows from a small set of semantic tokens, you can test contrast once, at the source. Automate a check that each text token meets WCAG contrast requirements against the surfaces it is allowed to appear on.
“A design system is a set of decisions. Tokens are how those decisions travel.”
Written by
Devant Design Studio
Product design and research
Product designers and researchers who shape interfaces, design systems and accessible experiences.




