← All posts
design tokenstutorialdesign systems

Design Tokens, Explained for Developers Who Skip the Design Phase

·Refine Design

If you've built a React app in the last two years, you've probably used design tokens without knowing it. Every time you wrote text-primary or bg-background in Tailwind, you referenced a token — a named value that maps a decision to a value.

But here's the problem: those defaults came from Tailwind, not from your brand.

What are design tokens?

Design tokens are the atomic units of a design system. They're the single source of truth for:

  • Colors: primary, secondary, accent, semantic (success, warning, error), plus full shade scales (50–950)
  • Typography: font families, weights, line heights, and a modular type scale
  • Spacing: a consistent scale (usually based on 4px or 8px multiples)
  • Borders: radius values (sm, md, lg, xl) and widths
  • Shadows: elevation levels mapped to specific box-shadow values
  • Effects: transitions, animations, opacity levels

When every component in your app pulls from the same token set, consistency happens automatically. Change --color-primary once, and every button, link, and heading updates.

Why AI tools need them

Without tokens, AI coding tools make decisions on the fly. GPT picks bg-blue-600 for one button and bg-indigo-500 for another. It uses rounded-lg on cards but rounded-xl on modals. Each choice is reasonable in isolation, but together they create visual noise.

Design tokens eliminate this entirely. When your AI reads a structured token file before generating code, every decision is pre-made:

``css

:root {

--color-primary: #306E5E;

--color-accent: #FF6719;

--radius-md: 8px;

--shadow-md: 0 4px 16px rgba(48, 110, 94, 0.08);

--font-heading: 'Fraunces', serif;

--font-body: 'Source Sans 3', sans-serif;

}

`

The AI doesn't guess — it references.

The three export formats

Refine Design generates your tokens in three formats:

CSS Custom Properties

Drop into any project. Works everywhere — React, Vue, Svelte, vanilla HTML.

Tailwind Config

A tailwind.config.ts theme extension that maps your tokens to Tailwind utility classes. Use bg-primary` instead of hardcoding hex values.

Style Dictionary JSON

The industry-standard token format. Feed it into Style Dictionary, Figma Tokens, or any design tool pipeline.

From interview to tokens in 5 minutes

The Refine Design onboarding flow asks you structured questions: industry, audience, emotional keywords, color preferences, typography scale ratio, spacing density, and shadow style. From these inputs, it generates:

  • Full shade scales (50–950) for every brand color
  • WCAG-validated contrast ratios
  • A modular type scale based on your chosen ratio
  • Shadow, radius, and spacing tokens derived from your design language

No design degree required. Just opinions about how your thing should feel.

Generate your tokens →

Ready to stop building generic?

Start your design interview