What problem does it solve?
Hardcoded colors and inconsistent spacing create visual chaos across pages. Theme design codifies the visual language into design tokens — change one token, and every component updates consistently. Themes make visual design systematical, not accidental.
Core Features & Use Cases
- Extract design tokens from brand guidelines (colors, fonts, logos)
- Define CSS custom properties on :root:
- Colors: primary, surface, text, border, semantic (error, success, warning)
- Typography: font-family, font-size scale, font-weight, line-height
- Spacing: 4px-based scale (4, 8, 12, 16, 24, 32, 48, 64)
- Radii: sm (4px), md (8px), lg (16px), full (9999px)
- Shadows: sm, md, lg (for elevation)
- Design dark mode: data-theme="dark" or prefers-color-scheme: dark
- Create component variants using design tokens (primary, secondary, danger, ghost)
- Test accessibility: contrast ratios, focus indicators, reduced motion
- Document theme tokens for developer reference
Quick Start
Extract tokens from brand guidelines and implement them as CSS custom properties on the root selector :root to build a theme with dark mode and component variants.