Tokens & Variables

A product without tokens stores its design decisions as loose values, and loose values drift. Imagine a bookings app whose brand teal is #1A9E96 in Figma, #1B9F97 in the web code and #199D95 on iOS. Every screen also animates at whatever speed its builder picked that afternoon.

Learn on the move: press play and turn your commute, walk or drive into time that grows your design career.

· Updated November 2026 · Reviewed by Olesia Borysova, lead product designer
Share
Share

So a design token gives each decision one name and one value, and every tool reads the value through that name. Change the token once, and the Book button, the links and the selected slot change together on every platform.

What a Token System Is Made Of

A token is a small record with a name, a type and a value. The W3C Design Tokens Community Group published a stable file format for that record in October 2025. Design tools and code can now read the same file.

That record is only the first part. Tokens sit in tiers, from raw values at the bottom to the roles components use, and each tier points only at the one below. Their names say what each token is for, so a teammate picks the right one without asking.

On top of that, motion belongs in the same system, with duration and easing tokens and a reduced set for people who turn motion off. In Figma, all of it lives as variables, sorted into collections, scoped to the right properties and linked by aliases.

Anatomy of a Token

A hard-coded value carries no meaning, so nobody can tell which other values should change with it. Imagine the bookings app's Book button set to #1A9E96 in forty places, and a rebrand that asks for a darker teal. A search for that hex finds the buttons, and it also finds a chart line that only happened to share the shade.

So a design token gives the decision a name and stores the value once. The button asks for color.action.primary, and only the parts that mean primary action change with it. Here is the same rebrand search run on a hex and on a token:

Two project searches. Wrong: searching the hex #1A9E96 finds BookButton, SlotChip and TextLink, and also RevenueChart, an unrelated chart line. Right: searching color.action.primary finds only the three primary actions.

Where the Name Comes From

The term comes from Salesforce. Jina Anne and Jon Levine named design tokens while building the Lightning Design System. The W3C Design Tokens Community Group credits them with the term. Their team built a tool called Theo that stored each value once and wrote it out in each platform's own format.

That idea spread because every large system hit the same wall. A product on web, iOS and Android keeps three copies of each color, and the copies drift apart one release at a time. Here is a rebrand on three copies kept by hand next to one value that Theo writes out for each platform:

One teal after a rebrand. Wrong: web, iOS and Android each keep a hand-typed copy, and Android still holds the old #1a9e96. Right: one value, color_action_primary #137a74, which Theo writes out as #137a74 in custom-properties.css, rgba(19, 122, 116, 1) in ios.json and #FF137A74 in android.xml.

So the community group wrote one shared file format, and on 28 October 2025 it published version 2025.10 as stable.

The Parts of a Token

In the 2025.10 format, a token is a small JSON object. Its name is the object's key, and every other part sits under a fixed key that starts with a dollar sign:

  • Name: the key, read together with the groups around it, such as color.action.primary.
  • Value ($value): the one part every token must have.
  • Type ($type): the kind of value, such as a color, a dimension or a duration.
  • Description ($description): a plain sentence on when to use the token.
  • Deprecated ($deprecated): a flag, or a note that names the replacement.
  • Extensions ($extensions): extra data a tool keeps for itself, such as a Figma variable ID.

That's why a color value looks longer than a hex code. The format stores the color space and its numbers, and it keeps the hex as a fallback for tools that need one. Here is the Book button's color written as one token:

The Book button's color as a token in the 2025.10 JSON format, with its parts named: the group color.action, the name primary, $type color, $value holding the color space srgb, the components 0.102, 0.620, 0.588 and the hex fallback #1a9e96, and a $description of Main actions.

Types and Groups

The type tells every tool how to read the value, and the format forbids guessing it from the value itself. It defines seven simple types: color, dimension, font family, font weight, duration, cubic Bézier and number.

On top of those, six composite types bundle simple values into one: stroke style, border, transition, shadow, gradient and typography. So a shadow token holds its color, offsets and blur together. A dimension stores a number with its unit, and the format allows only px and rem.

Because a file holds hundreds of tokens, the format nests them in groups. A group is any object without a $value, and a $type set on a group passes down to every token inside it. Here is how the bookings app's color tokens nest, with the type written once:

A tree of the bookings app's color tokens. The color group sets $type color once, and action.primary #1a9e96, action.primary-hover #137a74 and text.default #2a3132 all inherit that type.

Aliases

A token's value can point at another token instead of holding a value of its own. The format writes that reference in curly braces, so {color.teal.600} means use whatever that token holds. Tools follow the chain to a real value, and a loop of references counts as an error.

That's why aliases carry most of a system's meaning. color.action.primary can point at {color.teal.600}, and a rebrand changes that one pointer. Every button, chip and link that asks for the action color follows on the next build.

So the most common mistake is copying a value where an alias belongs. A token that repeats #1A9E96 looks right today and stays behind when the teal changes. Here is a copied value next to an alias after a rebrand:

Two token files after a rebrand changes color.teal.600 to #137a74. Wrong: color.action.primary copies the old #1a9e96, so the Book button keeps the old teal. Right: color.action.primary points at {color.teal.600}, so the Book button follows the new teal.

Pro tip: Fill in $description for every token people choose by hand, in one sentence that names where it goes. Figma variables carry a description field too, so the same sentence travels into the design file.

Found this useful? Pass it on.
Share

Why Follow DesignPath for Short Design Lessons?

Following DesignPath gives you short UX lessons, new free guides and course picks in your feed, from the team behind this page.