What problem does it solve?
Design-token systems provide a scalable way to manage colors, typography, spacing, and shadows by replacing hard-coded values with semantic tokens that can be themed and audited across an application.
Core Features & Use Cases
- Design Tokens: CSS custom properties that expose semantic tokens (e.g., --color-primary, --spacing-md) for consistent theming.
- Dark-Mode Support: Token overrides via [data-theme] attributes to switch between light and dark palettes without code changes.
- Token Auditing & Guidelines: Policies for semantic naming, token categorization, and documentation to prevent hard-coded values.
- Use Case: Implement a design system across a large product with a single source of truth for tokens, enabling rapid theming and accessibility improvements.
Quick Start
Create a tokens.css file that defines semantic tokens using CSS variables and implement a dark-mode override via [data-theme] attributes.