designmotionhq

visual

Design Tokens

47 changes, or just one. Design tokens change everything.

Watch on Instagram

Key insights

  • Name tokens by meaning, not value. color-primary survives a rebrand, while color-blue-500 becomes a lie the moment blue turns teal.
  • Structure tokens in three layers — primitives (raw values), semantic (meaning), and component (usage) — each referencing the layer above.
  • Change one primitive and it cascades through every component that points to it: one edit instead of 47 hunted-down values.
  • Define a scale and snap everything to it. A stray 13px padding or 17px gap collapses to 12 and 16, so consistency stops being a guess.
  • Dark mode isn't inverting colors — it's swapping one token set for another. Same components, alias tokens, a completely different feel.
  • Tokens are your single source of truth for color, spacing, and type — the design system is only as strong as they are.

Do / Don't

  • Do: Name tokens by role — color-primary, spacing-md, font-body — so they hold through a rebrand
  • Do: Layer tokens primitives → semantic → component so a single change cascades
  • Do: Snap arbitrary spacing and font sizes onto a fixed scale
  • Don't: Bake literal values into names like color-blue-500 or spacing-16
  • Don't: Treat dark mode as inverting colors instead of swapping token sets
  • Don't: Hardcode raw values across components instead of referencing tokens

Want Claude to build this correctly?

UX Engine gives Claude Code the senior-designer reasoning behind every pattern.

The Design System Blueprint

An 11-page visual guide to consistent, scalable UI: colors, typography, spacing, components, motion.

Get the Blueprint — free

The PDF, plus emails about new patterns and my tools. Unsubscribe anytime.

Related patterns