The contract every app inherits
Tokens are the interface between the system and your app. Two tiers, one consumption path. Get these right and a Webzenia app cannot drift off-brand.
Primitive
Raw values: the full scales (--neutral-975, --blue-600, oklch literals). Never referenced directly by components.Semantic
What components consume: --color-surface-base, --color-text-strong, --color-accent-fill. Re-points per theme.No primitive refs, no hex/rgb/oklch literals, no raw Tailwind spacing/type utilities in component code. Enforced by audit:system.
var(--space-step-N) for micro-spacing; semantic layout tokens for structure. Never raw px.
<Text role="…"> only. Never inline font-size / weight / leading / tracking.
262.236°. Blue is the scarce accent. Spend it on the one thing that must be seen.
:root is the dark surface. Light values re-point the same semantic tokens under [data-theme="light"]— components don’t change, only the scope does.
Gotcha: a light island needs the
data-theme="light" attribute, or the <Text> roles resolve to light-on-light and render invisible.One import gives you every token + the generated Tailwind utilities + the fonts.
One source feeds both code and Figma. The export parses tokens.css into a W3C design-tokens file; designers import it into Figma variables via Tokens Studio. Change a value once and both sides update — the design file can’t drift from the build.