Modes
Define multiple variants of your tokens — responsive breakpoints, light/dark themes, reduced motion, RTL layouts, and more — all in a single token set.
Currently limited to 2 modes per dimension. Support for additional modes is coming soon.
Declaring Modes
Declare modes at the top of your file. Use @[value1, value2] to map values to modes in order.
Mode Declaration
First mode is always the default.
Value Shorthands
Single value broadcasts to all modes. Fewer values fill right.
With Generators
Mode values flow into generator parameters — each mode gets its own scale:
Mode Types
Typed modes unlock the right CSS output automatically. Use /modes : typeName = [values].
Media Queries
breakpoints, colorScheme, contrast, motion, container
Data Attributes
theme, density, brand, direction
Breakpoints
Add numeric metadata for media query generation. Tokens without mode references stay in :root.
Color Scheme
Generates @media (prefers-color-scheme: dark). Only light and dark are valid.
Motion & Contrast
motion generates prefers-reduced-motion, contrast generates prefers-contrast.
Direction & Theme
direction uses [dir="rtl"], theme uses [data-theme="..."].
Fluid Breakpoints
Use (fluid) to generate clamp() functions that interpolate smoothly between breakpoints. Requires exactly 2 modes with numeric metadata.
Clamp Interpolation
Values scale linearly from mobile to desktop viewport.
Inverted (max-width)
(inverted) flips from min-width to max-width queries. First mode remains the default.
Strategies: (fluid) for smooth interpolation, (inverted) for max-width queries, or combine: (fluid, inverted).
Non-numeric tokens (colors, strings) fall back to discrete output.
Platform Output
Modes produce different output per platform.
CSS
Full range of @media queries, attribute selectors, and clamp() functions.
W3C JSON
Each mode is output as a separate JSON group.
Swift / Android
Separate classes per mode: DesignTokens (default) + DesignTokensDesktop.
Figma
Modes become Variable Modes within Collections.
Next: Custom Fonts — import custom font files and map them to design tokens.