How-To2026-09-0311 min read

How to Create Design Tokens in Figma

Design tokens are the atomic building blocks of a design system — the named values for colors, spacing, typography, and other visual properties that ensure consistency across every screen, component, and platform. Without tokens, you end up with fourteen slightly different shades of blue and spacing values that drift apart every time a designer makes a judgment call.

Figma's Variables feature provides a native way to define and manage design tokens directly in your design tool. This guide walks you through creating a token architecture in Figma that maps cleanly to code, supports theming, and scales as your design system grows.

Step-by-step guide

01

Define your token taxonomy and naming convention

Before creating anything in Figma, establish a naming hierarchy for your tokens. Use a three-tier structure: primitive tokens (raw values like blue-500, spacing-4), semantic tokens (purpose-driven names like color-primary, spacing-section), and component tokens (scoped names like button-padding, card-radius). Document this hierarchy so your entire team uses it consistently.

  • Create a spreadsheet mapping every visual value in your product to a token name
  • Follow the format category/property/variant — for example, color/text/primary or spacing/gap/lg
  • Define aliases where semantic tokens reference primitives — color/primary references blue/500
02

Create primitive color variables in Figma

Open your Figma design system file and navigate to the Variables panel. Create a new variable collection called Primitives. Add color variables for your full palette — every shade of your brand colors, neutrals, and utility colors. These are raw values that should never be used directly in designs; they exist only to be referenced by semantic tokens.

  • Define your color ramp with consistent steps: 50, 100, 200, ..., 900 for each hue
  • Include neutrals from white through grays to black with the same step convention
  • Add utility colors for success, warning, error, and info states
03

Build semantic color tokens that reference primitives

Create a second variable collection called Semantic. Define purpose-driven tokens like color/bg/primary, color/text/default, color/border/subtle, and color/accent/default. Each semantic token should alias a primitive token — for example, color/bg/primary aliases neutral/white in light mode. This indirection layer is what makes theming possible.

  • Map every UI surface to a semantic token: backgrounds, text, borders, and interactive states
  • Include hover, active, and disabled variants for interactive elements
  • Ensure every semantic token has a clear usage description so designers know when to apply it
04

Add spacing, radius, and typography tokens

Create number variables for your spacing scale (4, 8, 12, 16, 24, 32, 48, 64) and border radius values (none, sm, md, lg, full). For typography, use Figma's text styles rather than variables since Figma variables do not yet support all font properties. Name your text styles following the same token convention: text/heading/lg, text/body/md, text/caption/sm.

  • Define a spacing scale based on a 4px grid: 0, 1 (4px), 2 (8px), 3 (12px), up to 16 (64px)
  • Create radius tokens: none (0), sm (4), md (8), lg (12), xl (16), full (9999)
  • Build text styles for each combination of size, weight, and line-height you use
05

Configure modes for theming (light and dark)

In your Semantic variable collection, add a second mode called Dark. For each semantic color token, set the dark mode value to the appropriate primitive — for example, color/bg/primary aliases neutral/900 in dark mode instead of neutral/white. When a designer switches a frame's mode to Dark, every token-driven surface updates automatically without manual color swapping.

  • Set up Light and Dark modes in the Semantic collection's mode configuration
  • Remap every semantic color token to its dark mode equivalent primitive
  • Test the theme switch on a sample page to verify all surfaces, text, and borders adapt correctly
06

Apply tokens to your component library

Go through every component in your design system and replace hardcoded color, spacing, and radius values with the corresponding variables. A button's background should reference color/bg/accent, not a raw hex value. Its padding should reference spacing/3 and spacing/5, not manually typed 12px and 20px values. This is where the investment in tokens pays off — every component becomes theme-aware and consistent by default.

  • Start with your most-used components: buttons, inputs, cards, and navigation elements
  • Replace every fill, stroke, and text color with the appropriate semantic variable
  • Replace all padding and gap values with spacing variables from your Primitives collection
07

Export tokens for developer handoff

Use the Tokens Studio for Figma plugin or Figma's built-in REST API to export your variables as JSON. Transform this JSON into the format your codebase needs — CSS custom properties, Tailwind config values, or a platform-specific token format. Establish a sync workflow so token changes in Figma automatically propagate to your code repository via a pull request.

  • Install Tokens Studio or use Figma's Variables REST API to extract token values
  • Transform the export into CSS custom properties or your framework's token format
  • Set up a GitHub Action or CI step that syncs token changes from Figma to your codebase

Common mistakes

Using primitive tokens directly in components

If a button's background is set to blue/500 instead of color/bg/accent, theming breaks because the primitive does not change between modes. Always use semantic tokens in components and reserve primitives as the source values that semantics reference.

Creating too many tokens too early

Defining 500 tokens before you have components to use them leads to an unmaintainable system where half the tokens are unused. Start with the tokens your existing components need and expand as new patterns emerge.

Not documenting token usage guidelines

A token named color/text/secondary is meaningless without documentation explaining when to use it versus color/text/muted or color/text/default. Add descriptions to every token in Figma and maintain a usage guide that designers reference when choosing tokens.

Tips

Use Figma's variable scoping feature to restrict where tokens can be applied — for example, limit color tokens to fills only or strokes only to prevent misuse

Create a token documentation page in your Figma file that shows every token with its value, usage, and a visual example of where it appears in the UI

Name your modes consistently across collections (Light/Dark, Default/Compact) so switching modes on a frame updates all collections at once

Review your token usage quarterly to prune unused tokens and consolidate near-duplicates that have drifted into the system

How Vantage helps

Vantage integrates directly with Figma, allowing PMs to pull design context into their product specs. When your design system uses tokens, Vantage can reference specific token values in requirements, ensuring the implementation matches the design system exactly without manual specification.

Frequently asked questions

Spend less time on setup, more on decisions

Vantage connects your tools and generates specs grounded in real data. Free to start.

Free to start. No credit card required.

Related reading