Modes
Modes allow you to create variations of your design tokens within a tokenset. The most common use case is light and dark themes, but modes can represent any contextual variation.What is a Mode?
A mode is a variation or theme within a tokenset. Each mode contains different values for the same token names, allowing you to maintain multiple versions of your design system.Example
Common Use Cases
1. Theme Variations
Light and Dark Modes2. Platform Variants
Web vs Mobile3. Brand Variations
Primary and Secondary Brands4. Contextual Variations
Marketing vs ProductCreating Modes
Mode Properties
Default Mode
Each tokenset has one default mode. When you create a tokenset, a “Base” mode is created automatically as the default. The default mode is used:- As the fallback when no mode is specified
- As the reference for other modes
- When exporting without specifying a mode
Token Values Across Modes
The same token can have different values in different modes:Best Practices
1. Consistent Token Names
Use the same token names across all modes: ✅ Good:2. Complete Coverage
Ensure all tokens exist in all modes: ✅ All modes havecolors.primary
❌ Some modes missing colors.primary
3. Semantic Naming
Name modes clearly:- ✅ “Light”, “Dark”, “High Contrast”
- ❌ “Mode1”, “Mode2”, “Alt”
4. Default Mode Selection
Choose the most commonly used mode as default:- ✅ “Light” as default (if light theme is primary)
- ✅ “Base” as default (for platform-agnostic tokens)
Working with Modes
Listing Modes
Getting Tokens for a Mode
Exporting a Specific Mode
Mode-Specific Exports
When exporting, you can target specific modes:Implementation Example
React with Theme Switching
CSS with Media Query
Managing Modes
Updating a Mode
Deleting a Mode
Next Steps
Tokens
Learn about individual tokens
Export Modes
Export mode-specific tokens
API Reference
Mode API endpoints