In Review

Design Tokens

Tokens store design decisions within the design system. Design tokens are the building blocks of a design system. They store the visual styles of the system such as colours, typography, spacing, and more in a consistent, reusable format. Instead of using raw values like hex codes for colours or pixel values for spacing, design tokens apply contextual names like primary-colour or spacing-large. This abstraction allows the system to scale consistently across platforms and devices, all while using a shared language that both designers and developers can reference and communicate with ease.

What are Design Tokens?

Design tokens represent the fundamental aspects of a design, including things like colours, fonts, spacing, sizes, shadows, and other styles. They serve as a translation layer between designers and developers, helping to unify the two disciplines. For example, instead of hard coding #3498db as a colour across the system, a token called primary-colour is used. This token can represent #3498db in one theme but easily be swapped out for another value, such as #2ecc71, for a different theme without breaking the design system.

How Do Design Tokens Work?

Design tokens are typically stored in a centralised location, such as a JSON or YAML file, and are applied programmatically throughout the system. These tokens are then consumed by various platforms (web, mobile, etc.) to ensure the same design principles and visual styles are followed consistently.

For example:

"primary-colour": "#3498db"
"spacing-small": "8px"
"font-family-primary": "'Helvetica Neue', Arial, sans-serif"

These tokens can then be transformed and applied to different platforms using build tools or frameworks that support token usage, ensuring consistent styling across websites, native apps, and even design tools like Figma or Sketch.

Benefits of Design Tokens