dot CMS

What is a design token?

What is a design token?

Share this article on:

A design token is a key-value pair that represents a single piece of a design system's visual style. These tokens are used to store design decisions such as colors, typography, spacing, and other properties in a format that can be easily consumed and applied across different platforms and environments.


Key Concepts of Design Tokens

Atomic Elements:

Design tokens capture the smallest possible pieces of design decisions, like color values, font sizes, or spacing units.

 

Consistency:

Using tokens ensures that the same design values are used consistently across various components and screens.

 

Platform Agnostic:

Tokens can be transformed into different formats suitable for various platforms (e.g., CSS, JavaScript, iOS, Android), ensuring consistency across web, mobile, and other environments.

 

Scalability:

They enable easy updates and scalability. Changing a token value in one place can propagate that change throughout the entire system.

 

Themability:

Design tokens can be used to create themes. For example, dark and light themes can use different sets of tokens.


Types of Design Tokens

Color Tokens:

Store color values (e.g., primary, secondary, and background color).

 

Typography Tokens:

Define font-related properties (e.g., font family, font size, font weight).

 

Spacing Tokens:

Specify spacing units (e.g., margins, paddings, gaps).

 

Sizing Tokens:

Define size values (e.g., width, height).

 

Border Tokens:

Capture border properties (e.g., border width, border radius).

 

Shadow Tokens:

Represent shadow styles (e.g., box shadow, text shadow).


Example of Design Tokens

In JSON format, design tokens might look like this:

{
  "color": {
    "primary": "#FF5733",
    "secondary": "#33CFFF",
    "background": "#FFFFFF"
  },
  "typography": {
    "fontFamily": "Arial, sans-serif",
    "fontSize": {
      "small": "12px",
      "medium": "16px",
      "large": "24px"
    }
  },
  "spacing": {
    "small": "8px",
    "medium": "16px",
    "large": "32px"
  }
}

Benefits of Design Tokens

Centralized Control:

Makes it easier to manage and update design values from a single place.

 

Improved Collaboration:

Designers and developers have a common reference, reducing misunderstandings.

 

Efficiency:

Speeds up the development process by providing ready-to-use values.

 

Quality and Consistency:

Ensures a uniform look and feel across all parts of the application.

 


In summary, design tokens are fundamental building blocks in a design system, providing a structured and scalable way to manage design decisions across different platforms and components.

Recommended Reading
  • Migrating Your OSGi Plugins to dotEvergreen: Adapting to the New Index API
    24 Mar 26
    Technical Guides

    Migrating Your OSGi Plugins to dotEvergreen: Adapting to the New Index API

    An update on infrastructural changes, information on a breaking change introduced that may affect some plugins, and a migration guide for those affected.

    Fabrizzio

    Fabrizzio Araya

    Software Engineer

  • What Is Rich Text? How It Works in a Headless CMS
    23 Mar 26
    Content Management

    What Is Rich Text? How It Works in a Headless CMS

    What is rich text, and how does it differ from Rich Text Format (.rtf)? Learn how rich text works in content management systems, how headless CMS platforms store it as structured data, and why the format matters for omnichannel delivery.

    Fatima

    Fatima Nasir Tareen

    Marketing Specialist

  • Structured Content for GEO: How dotCMS Powers AI-Ready Digital Experiences
    21 Mar 26
    AI in CMS

    Structured Content for GEO: How dotCMS Powers AI-Ready Digital Experiences

    Discover how dotCMS revolutionizes AI-driven digital experiences with structured content for Generative Engine Optimization (GEO). Learn how our enterprise solution enhances AI visibility, enabling large language models to accurately process and cite machine-readable data. Dive into best practices for creating AI-ready content and explore the benefits of a headless CMS model. Optimize your content for AI discovery and experience seamless omnichannel delivery. Contact us to leverage dotCMS for your AI-powered search needs.

    Fatima

    Fatima Nasir Tareen

    Marketing Specialist

  • AI Content Governance for Content Teams: A Practical Framework
    9 Mar 26
    AI in CMS

    AI Content Governance for Content Teams: A Practical Framework

    Learn why AI content governance is essential for content teams. Discover how to protect brand consistency, reduce legal risk, and manage AI across dozens of sites with dotCMS’s built-in governance tools.

    Fatima

    Fatima Nasir Tareen

    Marketing Specialist

Explore dotCMS for your organization

image

dotCMS Named a Major Player

In the IDC MarketScape: Worldwide AI-Enabled Headless CMS 2025 Vendor Assessment

image

Explore an interactive tour

See how dotCMS empowers technical and content teams at compliance-led organizations.

image

Schedule a custom demo

Schedule a custom demo with one of our experts and discover the capabilities of dotCMS for your business.