Skip to content

Token format reference ​

Tokens are strict DTCG 2025.10 JSON in *.tokens.json files, compiled to CSS custom properties in @layer tessera.tokens. See Tokens for how they are organized and themed.

Supported types ​

$type$valueBecomes
color{ "colorSpace": "srgb", "components": [0.145, 0.388, 0.922] }a color
dimension{ "value": 16, "unit": "px" }16px (units px and rem)
duration{ "value": 150, "unit": "ms" }150ms (units ms and s)
number0.5a number
fontFamily["Inter", "system-ui", "sans-serif"]a font-family list
fontWeight600a number from 1 to 1000, or a name such as "bold"
cubicBezier[0.2, 0, 0, 1]cubic-bezier(0.2, 0, 0, 1)
strokeStyle"dashed"the string form
shadow{ "color": "{color.shadow}", "offsetX": ..., "offsetY": ..., "blur": ..., "spread": ... }a box-shadow
border{ "color": "...", "width": "...", "style": "solid" }a border shorthand
transition{ "duration": "...", "delay": "...", "timingFunction": "..." }a transition shorthand

Anything else (a gradient, a typography composite) is reported as T1004 rather than ignored. Unsupported DTCG features such as group $extends and $ref are T1009.

Names ​

A token path becomes a custom property: space.4 is --t-space-4, color.action.primary.bg is --t-color-action-primary-bg. Names use letters, numbers, - and _ (T1002).

Tiers ​

Each token is a primitive, semantic or component token ($extensions.tessera.tier, inheritable from a group). Components should use semantic tokens; using a primitive is T2105.

Theme files ​

A file in themes/ overrides values of existing tokens. "$extends" names the base, "$attribute" the HTML attribute (default theme) and "$auto" an optional media feature. A theme cannot add a token or change a type (T1011, T1012).

This repository's tokens ​

The design system in system/tokens, as tessera tokens build reports it.

TokenTypeTier
color.neutral.0colorprimitive
color.neutral.100colorprimitive
color.neutral.200colorprimitive
color.neutral.600colorprimitive
color.neutral.700colorprimitive
color.neutral.800colorprimitive
color.neutral.900colorprimitive
color.blue.300colorprimitive
color.blue.400colorprimitive
color.blue.600colorprimitive
color.blue.700colorprimitive
color.red.400colorprimitive
color.red.500colorprimitive
color.red.700colorprimitive
color.red.800colorprimitive
color.surface.defaultcolorsemantic
color.surface.raisedcolorsemantic
color.surface.hovercolorsemantic
color.surface.inversecolorsemantic
color.text.defaultcolorsemantic
color.text.mutedcolorsemantic
color.action.primary.bgcolorsemantic
color.action.primary.bg-hovercolorsemantic
color.action.primary.fgcolorsemantic
color.action.primary.textcolorsemantic
color.action.danger.bgcolorsemantic
color.action.danger.bg-hovercolorsemantic
color.action.danger.fgcolorsemantic
color.action.danger.textcolorsemantic
color.focus.ringcolorsemantic
color.border.defaultcolorsemantic
color.border.strongcolorsemantic
space.1dimensionsemantic
space.2dimensionsemantic
space.3dimensionsemantic
space.4dimensionsemantic
space.5dimensionsemantic
space.6dimensionsemantic
space.8dimensionsemantic
space.0-5dimensionsemantic
radius.smdimensionsemantic
radius.mddimensionsemantic
radius.lgdimensionsemantic
radius.fulldimensionsemantic
font.family.sansfontFamilysemantic
font.weight.regularfontWeightsemantic
font.weight.boldfontWeightsemantic
font.size.smdimensionsemantic
font.size.basedimensionsemantic
font.size.lgdimensionsemantic
opacity.disablednumbersemantic
motion.duration.fastdurationsemantic
motion.easing.standardcubicBeziersemantic
shadow.mdshadowsemantic