design token

A named design decision, such as a colour, font size or spacing value, stored as data so every platform can use the same value.

In more detail

Instead of typing #3b82f6 or 16px into many files, teams give the value a name such as color.action.bg and reference the name. Tokens are stored in JSON files and compiled into CSS, TypeScript, iOS and Android formats. Changing a token in one place changes it everywhere it is used.

Examples

In the browser: Components use semantic token names, and themes change what the tokens point to. That keeps colour choices in one place.
A UI component package depends on a tokens package, so changing a token forces the components to rebuild.

Related terms

Taught in

References