My Resume
  • Design tokens

Design tokens, explained simply

What design tokens are, why they matter, and how to name them so both designers and developers can use them.

Article details

Published
5 July 2023
Reading time
2 min read
Topics
Design tokens

Design tokens sound technical, but the idea is simple: give every design decision a name, and use the name instead of the raw value.

01A token is a named decision

Instead of writing #0B5C9E in fifty places, you name it once, for example blue-700, and use that name everywhere. Change the value behind the name and every place that uses it updates.

02Three layers that keep things sane

  • Primitive tokens hold the raw palette: blue-700, space-4, radius-lg. They describe what a value is.
  • Semantic tokens describe what a value is for: action-primary, text-secondary, border-default.
  • Component tokens, when you need them, tie a semantic token to one component: button-background.

Designers and developers mostly use semantic tokens. That’s what makes theming possible: dark mode is just a different set of values behind the same semantic names.

03Naming that survives

  • Name by purpose, not by look. text-danger keeps working when red becomes orange.
  • Keep one pattern, such as category-property-variant, and stick to it.
  • Avoid names tied to one screen. A token should be useful in more than one place.

04Where tokens live

In Figma, tokens live as variables and styles. In code, they become CSS custom properties or platform values. The goal is one source of truth that both sides read from, so a decision is made once and shipped everywhere.

Written byMohamed Abo SolimanLead Product Designer · Design Systems
ShareinX
Next articleA practical guide to Figma variables

Available for select projects

Building a design system?

I help teams set up design systems and DesignOps that people actually adopt.