Skip to main content

Interface: ThemeTokensV2

Defined in: Types.ts:675

Full ttoss Design Tokens v2 Theme contract.

Two layers:

  • core — raw primitives and responsive engines (immutable across modes)
  • semantic — stable aliases consumed by components (remapped per mode)

Extensions are optional properties inside core and semantic. When present they follow the same core → semantic contract.

Properties

core

core: object

Defined in: Types.ts:676

border

border: CoreBorder

breakpoint

breakpoint: CoreBreakpoints

Viewport thresholds. Core-only — no semantic layer.

colors

colors: CoreColors

dataviz?

optional dataviz?: CoreDataviz

Data Visualization extension — analytical color palettes and non-color encoding primitives. Optional: omit when the theme does not support dataviz.

elevation

elevation: object

elevation.dark?

optional dark?: CoreElevationLevels

Dark-optimized shadow recipes.

Themes that support a dark mode enrich core with these recipes, so that the dark semantic alternate can remap to them without mutating the base level tokens.

elevation.level

level: CoreElevationLevels

Base shadow recipes (used by light mode by default).

font

font: CoreFont

motion

motion: CoreMotion

opacity

opacity: CoreOpacity

radii

radii: CoreRadii

size

size: CoreSize

space

space: CoreSpaceSteps

type

type: object

type.ramp

ramp: CoreTypeRamp

zIndex

zIndex: CoreZIndex


semantic

semantic: object

Defined in: Types.ts:707

border

border: SemanticBorder

colors

colors: SemanticColors

dataviz?

optional dataviz?: SemanticDataviz

Data Visualization extension — semantic roles for analytical color, non-color encodings, and geospatial overlays. Optional: omit when the theme does not support dataviz.

This is the public API of the dataviz extension. Components consume these tokens; never core.dataviz.* directly.

elevation

elevation: SemanticElevation

focus

focus: SemanticFocus

motion

motion: SemanticMotion

opacity

opacity: SemanticOpacity

radii

radii: SemanticRadii

sizing

sizing: SemanticSizing

spacing

spacing: SemanticSpacing

text

text: SemanticText

zIndex

zIndex: SemanticZIndex