Skip to content
Sapphire UIv4.1.0

Tokens and themes

Semantic tokens are the shared contract for CSS, React and native HTML. Foundations load fonts, tokens, base styles and layout primitives once.

Theme scopes

Set data-theme="light" or data-theme="dark" on the document or a section. Omit it to follow the system preference; .dark also forces dark.

Light surface

The same semantic tokens choose a readable surface and foreground.

Dark surface

The same semantic tokens choose a readable surface and foreground.

Customise the system

Override colours on every theme scope so nested sections keep your theme. Using only :root does not override a section that declares its own theme.

:root, [data-theme="light"], [data-theme="dark"], .dark {
  --brand: light-dark(#c5a065, #c5a065);
}

Browse colours and resolved values · Browse typography · Spacing, shape and elevation

Search documentation