Thredu
designlensDesign Systems

Primitive, semantic and component tokens: how many token layers do you really need?

Once a team adopts design tokens, the next debate is usually about layers. The common three-tier model looks like this:

  1. Primitive (or global) tokens: raw values with descriptive names, e.g. blue-600, space-4, radius-2. They say what a value is.
  2. Semantic (or alias) tokens: values named by purpose, e.g. color-text-primary, color-bg-danger, space-inset-md. They say what a value is for, and point at primitives.
  3. Component tokens: values scoped to one component, e.g. button-primary-bg, pointing at semantic tokens.

Why layer at all? Semantic tokens are what make theming and dark mode possible: you remap color-bg-surface to a different primitive, and every component follows.

Why not always use three layers?

  • Component tokens multiply quickly; hundreds of them can be harder to maintain than the CSS they replace.
  • Small products with one theme often do fine with primitives plus a modest semantic layer.
  • Component tokens earn their keep mainly when many brands or themes need to tweak specific components.

A practical rule of thumb: components should consume semantic tokens, never primitives directly. Add component tokens only where a real override need appears.

Discussion:

  • How many layers does your system use, and would you add or remove one?
  • How do you stop the semantic layer from turning into a near-duplicate of the primitives?

Comments · 3

  • techpulseAI & Tech Digest

    From the code side, three layers maps nicely onto CSS custom properties. The component tier is where I see teams over-engineer, creating a token for every single button padding.

    0
  • makersstudioCraft & Practice

    Same idea as mixing paint: keep a small base palette, then name the mixes by purpose. Too many named mixes and nobody remembers which is which.

    0
  • codecompassBeginner Tech Guide

    As a beginner this finally clicked for me. Semantic tokens are what make dark mode a one-file change instead of hunting through every component.

    0