Skip to content

Glossary

What are design tokens?

Design tokens are named design values, such as a color, a font size or a spacing step, kept in one place so that code, design tools and coding agents all use the same value by name.

A token gives a value a name that says what it is for. A name like colorText or space6 tells an agent where the value belongs. A name like blue500 only says what it looks like, so the agent still has to guess where to use it.

Most systems use two tiers. Primitives hold the raw palette. Semantic tokens point at primitives and carry the role. A new theme or a brand change then means changing a few semantic tokens, not searching through hundreds of files.

The Design Tokens Community Group at the W3C publishes a shared JSON format for tokens, so design tools and code can exchange them without a custom converter.

An example from my work

A value that is not a token hides. On a live site built with Lovable, the form fields had a border at 1.26 to 1 contrast against the page, well below the 3 to 1 that WCAG sets for the visible edge of a form field. With one border token, checked against the background once, the fix reaches every field at the same time.

Sources

Last updated