Tokens
CSS custom properties on :root, prefixed --dui-, in two tiers. Semantic tokens are the public API, and the only ones base, layout and component CSS use (npm run lint:tokens checks). To theme, override them (Theming).
Token files
- Primitive tokens: 190 tokens, internal.
- Semantic tokens: 201 tokens, public theming API.
Tiers
From Theming:
| Tier | File | Named by | Example | Public? |
|---|---|---|---|---|
| Primitive | css/tokens/primitives.css | What it is | --dui-color-indigo-9: oklch(53% 0.215 272); --dui-space-5: 1rem; | No. Internal, may change in any release. |
| Semantic | css/tokens/semantic.css | What it is for | --dui-color-accent: light-dark(var(--dui-color-neutral-12), var(--dui-color-neutral-dark-12)); | Yes. The stable theming API. |