Design tokens are the named values behind every OTTO colour, type style, space, radius, shadow and motion curve. Use the token, not the value it holds: work stays consistent across web and app, and themes switch without a single change in code.
Three tiers
| Tier | Prefix | What it holds | When to use it | Tokens |
|---|---|---|---|---|
| Semantic | --oc-semantic-* |
a value named by its job, such as text-default or spacing-absolute-100; product details such as prices use --oc-feature-semantic-* |
in everything that ships; semantic tokens switch with the theme | 285 |
| Base | --oc-base-* |
the raw scales: colour steps, dimensions, durations | to understand a semantic value and in drafts; never in shipped code | 291 |
| Component | --oc-component-* |
the inner values of OTTO Components, and --oc-feature-* for product features |
never directly; the components set them. Listed so a draft can match a component exactly | 1,007 |
1,583 tokens in total, 163 of them deprecated. Each topic page lists its deprecated tokens at the end, with the replacement.
Topics
- ColourSemantic colours for text, backgrounds, strokes and overlays, in light and dark.
- TypographyType styles for display, headline and copy text in OTTO Sans.
- Spacing and layoutSpacing steps, layout gaps, breakpoints and the dimension scale.
- Shape and elevationCorner radius, border width, shadows and the focus and checked outlines.
- MotionDurations, easings, transitions and animations, with reduced-motion values.
- Base paletteThe raw colour scales behind the semantic colours; reference only.
- Base valuesRaw font, duration and shadow values behind the semantic tokens; reference only.
- Component tokensThe inner values of every OTTO component; for matching, never for direct use.
How to use them
- Use semantic tokens in anything that ships. They are stable and themeable (light, dark, OneX).
- Base tokens are raw values and can change without notice. OTTO's rule: "Do not use Base tokens in your production code. Base tokens are subject to change and can break. Instead, use semantic tokens."
- Component tokens are internal to OTTO Components and not part of the public API. Do not reference them.
- If a token is missing, do not invent one: take the closest semantic token and flag the gap.
- Dark mode: set
data-color-scheme="dark"(orauto) on<html>; only semantic tokens switch. See Theming. - Prefer the utility classes (
oc-text-color-*,oc-background-color-*,oc-p-*,oc-gap-*,oc-border-radius-*,oc-shadow-*,oc-headline-*,oc-copy-*) where they exist; they wrap these tokens. See Fragments.
The full guidance: Use design tokens, Design tokens overview and Theming.
Files
| File | Content |
|---|---|
tokens.css |
every token as a CSS custom property: 631 on :root (light), dark overrides on html[data-color-scheme=dark] and html[data-color-scheme=auto] under prefers-color-scheme: dark, OneX overrides on html[data-onex=yeah] |
tokens.json |
all 1,583 tokens with tier, category, type, the value per theme (light, dark, OneX), the token each value points to, notes and deprecations |
| Fonts folder | OTTO Sans (regular 400, medium 500, bold 700, black 800), OTTO Sans Thin and OTTO Play as web fonts, with the matching fonts.css. The CSS family is OttoSans; the token value 'OTTOSans' matches it, as font family names ignore case |
