Design services
  • Brand Identity
    Logos, strategy, and stationery design.
  • UI / UX Design
    High-end interfaces for web and mobile.
  • Creative Assets
    Digital and print marketing collateral.
  • Visual Production
    Professional photography and videography.
  • Print Media
    Brand-consistent packaging and print design.
Build services
  • Custom Web & Mobile Apps
    Scalable web and mobile products, built right.
  • Mobile Apps Development
    Native apps engineered for speed and scale.
  • Startup & MVP Solutions
    Rapid prototypes for new ventures.
  • Cloud-Based Systems
    Scalable, secure cloud architecture.
  • Business Automation
    Custom code that streamlines workflows.
Grow services
  • Performance Marketing
    Ad campaigns engineered for ROAS and CPA.
  • Social Media Management
    Community building that drives loyalty.
  • Search Engin Optimization
    Technical fixes that boost rank and speed.
  • Generative Engine Optimization
    Get cited by ChatGPT and AI Overviews.
  • Answer Engine Optimization
    Content built to get quoted by AI.
  • Influencer Marketing
    Creator partnerships for authentic trust.
  • Advanced Analytics
    Tracking and attribution for smart scaling.
  • Public Relations
    Media placements that build brand authority.
  • Content Strategy
    Copywriting that converts at every stage.
Ignious Studio
ProcessOur WorkTeamBlogLet's Talk
Ignious StudioLet's Talk
Home/Blog/Design

September 18, 2025

Design Tokens: How to Build a Scalable Design System from Scratch

By Maaz Hasan|Co-founder & CTO

Table of Contents

  1. What Are Design Tokens?
  2. The Three-Tier Token Architecture
  3. Tier 1: Global (Primitive) Tokens
  4. Tier 2: Alias (Semantic) Tokens
  5. Tier 3: Component Tokens
  6. Syncing Figma and Code with Tokens
  7. Dark Mode With Tokens
  8. Common Token Architecture Mistakes

Table of Contents

  1. What Are Design Tokens?
  2. The Three-Tier Token Architecture
  3. Tier 1: Global (Primitive) Tokens
  4. Tier 2: Alias (Semantic) Tokens
  5. Tier 3: Component Tokens
  6. Syncing Figma and Code with Tokens
  7. Dark Mode With Tokens
  8. Common Token Architecture Mistakes

TL;DR

Design tokens are the atomic foundation of every great design system. Learn how to structure tokens for color, typography, spacing, and motion — and sync them between Figma and code.

What Are Design Tokens?

Design tokens are the smallest indivisible units of a design system — the named variables that store visual design decisions. Instead of hardcoding #1A1A2E across 200 components, you define color.text.primary = #1A1A2E once and reference the token everywhere.

When the primary text color changes (brand refresh, dark mode), you update one value. Every component in every product surface updates automatically.

Pro Tip: Tokens are not just for colors. They apply to typography scales, spacing, border radius, shadow, opacity, motion duration, and z-index layers.

The Three-Tier Token Architecture

The most robust token systems use a three-tier hierarchy: Global → Alias → Component.

Tier 1: Global (Primitive) Tokens

Global tokens are raw values with no semantic meaning. They are never used directly in components.

color.green.500 = #22c55e
color.green.600 = #16a34a
color.slate.900 = #0f172a
spacing.4 = 16px
spacing.8 = 32px
font.size.base = 16px
font.size.lg = 18px

Tier 2: Alias (Semantic) Tokens

Alias tokens map semantic meaning to global values. These are what you use in components.

color.text.primary = {color.slate.900}
color.text.success = {color.green.600}
color.background.page = #ffffff
space.component.padding-md = {spacing.4}
type.body.size = {font.size.base}

Tier 3: Component Tokens

Component tokens are scoped to a specific component. They reference alias tokens and allow per-component overrides without breaking the global system.

button.primary.background = {color.brand.primary}
button.primary.text = {color.text.inverse}
button.primary.padding-x = {space.component.padding-md}
input.border.color = {color.border.default}
input.border.color.focus = {color.brand.primary}

Syncing Figma and Code with Tokens

The holy grail of design systems is a single source of truth that works in both Figma and code. The tooling has matured significantly:

  • Figma Variables — Figma's native token system (released 2023). Supports modes (light/dark), string, color, number, and boolean types.
  • Style Dictionary — Amazon's open-source token transformer. Takes a JSON token file and outputs CSS custom properties, SCSS variables, iOS Swift, Android XML — from one source.
  • Token Studio (Figma plugin) — Syncs tokens between Figma and a JSON file in your Git repo. Change a token in Figma → PR is created → CSS variables update automatically.

Key Takeaway: The goal is a workflow where a designer changes a color token in Figma, it commits to Git, CI runs Style Dictionary, and the production app reflects the change — without any manual handoff.

Dark Mode With Tokens

Dark mode is trivial if your tokens are well-structured. You define two modes for your alias tokens:

/* Light mode */
[data-theme="light"] {
  --color-text-primary: #0f172a;
  --color-background-page: #ffffff;
  --color-border-default: #e2e8f0;
}

/* Dark mode */
[data-theme="dark"] {
  --color-text-primary: #f1f5f9;
  --color-background-page: #0f172a;
  --color-border-default: #334155;
}

Components that use semantic tokens (not raw color values) automatically adapt to both modes with zero additional work.

Common Token Architecture Mistakes

  • Using global tokens in components directly — Using color.green.500 in a button component means you lose the semantic layer. When "success" becomes a different shade of green, nothing updates automatically.
  • Too many token tiers — Global → Alias → Component is sufficient for 99% of products. Adding a fourth tier creates complexity without benefit.
  • Inconsistent naming conventions — Pick a convention (kebab-case, dot.notation, or camelCase) and enforce it across both Figma and code.
  • Tokens without documentation — A token named color.surface.3 tells nobody anything. Document the intent: "Used for elevated card surfaces in the dashboard layout."
Maaz Hasan

Co-founder & CTO

CTO and co-founder of Ignious Studio. I build scalable digital products and write about design systems, web performance, and growth strategy for ambitious brands.

You might also like

Design

The Complete Guide to UI/UX Design for SaaS Products in 2025

Everything a SaaS founder or product team needs to know about UI/UX design — from wireframing to design systems, accessibility, and measuring design ROI.

Aug 31, 20255 min
Design

Mobile-First UI Design: Why It's Not Optional Anymore

Over 60% of global web traffic comes from mobile devices. Here's how to design SaaS interfaces that work perfectly on small screens — without sacrificing desktop power.

TagsUI/UXDesign Systems
Sep 10, 20257 min
Design

Design Tokens: How to Build a Scalable Design System from Scratch

Design tokens are the atomic foundation of every great design system. Learn how to structure tokens for color, typography, spacing, and motion — and sync them between Figma and code.

Sep 18, 20258 min

Contact and site footer

Let's collaborate

Have any projects in mind?

Let's Talk
Project enquiry

Tell us a little about it.

+88 01672 87 6464hello@ignious.studio

Design

  • Brand Identity
  • UI / UX Design
  • Creative Assets
  • Visual Production
  • Print Media

Build

  • Custom Web & Mobile Apps
  • Mobile Apps Development
  • Startup & MVP Solutions
  • Cloud-Based Systems
  • Business Automation

Grow

  • Performance Marketing
  • Social Media Management
  • Search Engin Optimization
  • Generative Engine Optimization
  • Answer Engine Optimization
  • Influencer Marketing
  • Advanced Analytics
  • Public Relations
  • Content Strategy

© 2026 Ignious Studio. All Rights Reserved.

Ignious Studio icon
  • Terms
  • Privacy
  • Cookies
Let’s Build Together