Design tokens

Every role of the default token set, with a preview, the value it resolves to on this page and what it is for.

Each role is a --tp-* custom property on the document root. Values are read from this page, so the theme switcher in the header and a compact density show up in them. Override a role on any element to change it for everything inside; Theming covers replacing the set.

Color

Semantic surfaces, each paired with the foreground placed on it, plus lines, focus and chart series. Foreground rows give their contrast on the paired surface, flagged under 4.5:1.

TokenPreviewValueDescription--tp-backgroundvar(--tp-background)Base surface of the interface.--tp-foregroundvar(--tp-foreground)Text and icons on the base surface.--tp-cardvar(--tp-card)Contained surface in ordinary flow, such as cards and panels.--tp-card-foregroundvar(--tp-card-foreground)Text and icons on card surfaces.--tp-popovervar(--tp-popover)Floating or layered surface, such as popovers, menus and dialogs.--tp-popover-foregroundvar(--tp-popover-foreground)Text and icons on floating surfaces.--tp-primaryvar(--tp-primary)Primary action or selected emphasis.--tp-primary-foregroundvar(--tp-primary-foreground)Text and icons on primary fills.--tp-secondaryvar(--tp-secondary)Secondary action or emphasis.--tp-secondary-foregroundvar(--tp-secondary-foreground)Text and icons on secondary fills.--tp-mutedvar(--tp-muted)Low-emphasis surface, such as tracks, wells and placeholders.--tp-muted-foregroundvar(--tp-muted-foreground)Low-emphasis text and icons: descriptions, hints and captions.--tp-accentvar(--tp-accent)Transient hover, active or highlighted surface.--tp-accent-foregroundvar(--tp-accent-foreground)Text and icons on accent surfaces.--tp-destructivevar(--tp-destructive)Destructive action or error surface.--tp-destructive-foregroundvar(--tp-destructive-foreground)Text and icons on destructive fills.--tp-successvar(--tp-success)Successful or positive status surface.--tp-success-foregroundvar(--tp-success-foreground)Text and icons on success fills.--tp-warningvar(--tp-warning)Cautionary status surface.--tp-warning-foregroundvar(--tp-warning-foreground)Text and icons on warning fills.--tp-primary-subtlevar(--tp-primary-subtle)Tinted fill of primary status: informational badges and alerts.--tp-primary-subtle-foregroundvar(--tp-primary-subtle-foreground)Primary text tone on its tinted fill and on surfaces.--tp-primary-bordervar(--tp-primary-border)Edge of primary status fills.--tp-destructive-subtlevar(--tp-destructive-subtle)Tinted fill of destructive status: destructive variants and error alerts.--tp-destructive-subtle-foregroundvar(--tp-destructive-subtle-foreground)Destructive text tone on its tinted fill and on surfaces, such as error messages.--tp-destructive-bordervar(--tp-destructive-border)Edge of destructive status fills.--tp-success-subtlevar(--tp-success-subtle)Tinted fill of success status: success variants and alerts.--tp-success-subtle-foregroundvar(--tp-success-subtle-foreground)Success text tone on its tinted fill and on surfaces.--tp-success-bordervar(--tp-success-border)Edge of success status fills.--tp-warning-subtlevar(--tp-warning-subtle)Tinted fill of warning status: warning variants and alerts.--tp-warning-subtle-foregroundvar(--tp-warning-subtle-foreground)Warning text tone on its tinted fill and on surfaces.--tp-warning-bordervar(--tp-warning-border)Edge of warning status fills.--tp-bordervar(--tp-border)Separators and lines.--tp-edgevar(--tp-edge)Outer edge of a component or panel, such as cards and tables.--tp-hairlinevar(--tp-hairline)Fine edge of floating surfaces (menus, popovers, lists, toolbars) and value surfaces.--tp-inputvar(--tp-input)Edge of fields and outline controls.--tp-controlvar(--tp-control)Fill of fields and outline controls.--tp-control-strongvar(--tp-control-strong)Stronger fill of fields and outline controls: the hover fill of outline and ghost controls and the fill of disabled fields.--tp-control-bordervar(--tp-control-border)Boundary of checkboxes and radios, at a non-text contrast against the page.--tp-choicevar(--tp-choice)Fill of a chosen radio: the control fill by default, the primary color when flat.--tp-choice-foregroundvar(--tp-choice-foreground)Dot of a chosen radio.--tp-ringvar(--tp-ring)Focus indication.--tp-chart-1var(--tp-chart-1)First categorical data series.--tp-chart-2var(--tp-chart-2)Second categorical data series.--tp-chart-3var(--tp-chart-3)Third categorical data series.--tp-chart-4var(--tp-chart-4)Fourth categorical data series.--tp-chart-5var(--tp-chart-5)Fifth categorical data series.

Syntax color

One color per lexical scope of highlighted code.

TokenPreviewValueDescription--tp-syntax-commentvar(--tp-syntax-comment)Comments.--tp-syntax-keywordvar(--tp-syntax-keyword)Keywords and storage modifiers.--tp-syntax-stringvar(--tp-syntax-string)String and template literals.--tp-syntax-numbervar(--tp-syntax-number)Numeric literals.--tp-syntax-functionvar(--tp-syntax-function)Function and method names.--tp-syntax-typevar(--tp-syntax-type)Type, class and interface names.--tp-syntax-constantvar(--tp-syntax-constant)Named and literal constants.--tp-syntax-variablevar(--tp-syntax-variable)Variables and parameters.--tp-syntax-propertyvar(--tp-syntax-property)Properties, keys and member names.--tp-syntax-tagvar(--tp-syntax-tag)Markup element names.--tp-syntax-attributevar(--tp-syntax-attribute)Markup attribute names.--tp-syntax-operatorvar(--tp-syntax-operator)Operators.--tp-syntax-insertedvar(--tp-syntax-inserted)Added lines in a diff.--tp-syntax-deletedvar(--tp-syntax-deleted)Removed lines in a diff.

Content color

Colors that people apply inside documents: per hue, a surface for highlights and table cell backgrounds and a foreground for text. Only user content and the swatches that offer these colors use them. Foreground rows give their contrast on their surface and on the background, flagged under 4.5:1.

TokenPreviewValueDescription--tp-content-grayvar(--tp-content-gray)Gray highlight and table cell background in user content.--tp-content-gray-foregroundvar(--tp-content-gray-foreground)Gray text in user content, and text on the gray surface.--tp-content-brownvar(--tp-content-brown)Brown highlight and table cell background in user content.--tp-content-brown-foregroundvar(--tp-content-brown-foreground)Brown text in user content, and text on the brown surface.--tp-content-orangevar(--tp-content-orange)Orange highlight and table cell background in user content.--tp-content-orange-foregroundvar(--tp-content-orange-foreground)Orange text in user content, and text on the orange surface.--tp-content-yellowvar(--tp-content-yellow)Yellow highlight and table cell background in user content.--tp-content-yellow-foregroundvar(--tp-content-yellow-foreground)Yellow text in user content, and text on the yellow surface.--tp-content-greenvar(--tp-content-green)Green highlight and table cell background in user content.--tp-content-green-foregroundvar(--tp-content-green-foreground)Green text in user content, and text on the green surface.--tp-content-bluevar(--tp-content-blue)Blue highlight and table cell background in user content.--tp-content-blue-foregroundvar(--tp-content-blue-foreground)Blue text in user content, and text on the blue surface.--tp-content-purplevar(--tp-content-purple)Purple highlight and table cell background in user content.--tp-content-purple-foregroundvar(--tp-content-purple-foreground)Purple text in user content, and text on the purple surface.--tp-content-pinkvar(--tp-content-pink)Pink highlight and table cell background in user content.--tp-content-pink-foregroundvar(--tp-content-pink-foreground)Pink text in user content, and text on the pink surface.--tp-content-redvar(--tp-content-red)Red highlight and table cell background in user content.--tp-content-red-foregroundvar(--tp-content-red-foreground)Red text in user content, and text on the red surface.

Spacing

Padding, gaps and margins. Every step is the spacing seed times its number; a trailing -5 is the half step.

TokenPreviewValueDescription--tp-spacingvar(--tp-spacing)Seed of the spacing scale. Every space step, control height and icon size multiplies it.--tp-space-0var(--tp-space-0)No space.--tp-space-0-5var(--tp-space-0-5)Half a step.--tp-space-1var(--tp-space-1)One step.--tp-space-1-5var(--tp-space-1-5)One and a half steps.--tp-space-2var(--tp-space-2)Two steps.--tp-space-2-5var(--tp-space-2-5)Two and a half steps.--tp-space-3var(--tp-space-3)Three steps.--tp-space-4var(--tp-space-4)Four steps.--tp-space-5var(--tp-space-5)Five steps.--tp-space-6var(--tp-space-6)Six steps.--tp-space-8var(--tp-space-8)Eight steps.--tp-space-10var(--tp-space-10)Ten steps.--tp-space-12var(--tp-space-12)Twelve steps.--tp-space-16var(--tp-space-16)Sixteen steps.

Font family

Typefaces for interface text, headings and code.

TokenPreviewValueDescription--tp-font-sansvar(--tp-font-sans)Interface text; the default for every component.--tp-font-headingvar(--tp-font-heading)Headings and titles. Follows the sans family unless a theme sets it.--tp-font-monovar(--tp-font-mono)Code, keyboard input and machine values such as codes and readouts.

Font size

Type scale, from the smallest text to page titles.

TokenPreviewValueDescription--tp-text-xsvar(--tp-text-xs)Smallest text: captions, badges and dense metadata.--tp-text-smvar(--tp-text-sm)Small text: controls, tables and secondary copy.--tp-text-basevar(--tp-text-base)Body text; the default size.--tp-text-lgvar(--tp-text-lg)Large text and small headings.--tp-text-xlvar(--tp-text-xl)Section headings.--tp-text-2xlvar(--tp-text-2xl)Largest text: page titles and figures.

Font weight

Weights for body text, labels, titles and strong emphasis.

TokenPreviewValueDescription--tp-font-normalvar(--tp-font-normal)Body text; the default weight.--tp-font-mediumvar(--tp-font-medium)Labels, controls and light emphasis.--tp-font-semiboldvar(--tp-font-semibold)Titles and headings.--tp-font-boldvar(--tp-font-bold)Strong emphasis.

Line height

Line heights as multiples of the font size.

TokenPreviewValueDescription--tp-leading-tightvar(--tp-leading-tight)Compact lines: headings, labels and single-line controls.--tp-leading-normalvar(--tp-leading-normal)Body text; the default line height.--tp-leading-relaxedvar(--tp-leading-relaxed)Open lines for longer reading.

Letter spacing

Letter spacing relative to the font size.

TokenPreviewValueDescription--tp-tracking-tightvar(--tp-tracking-tight)Tighter letters for large headings.--tp-tracking-normalvar(--tp-tracking-normal)Neutral letter spacing; the default.--tp-tracking-widevar(--tp-tracking-wide)Wider letters for small or uppercase labels.

Size

Block size of single-line controls, icon extents and the minimum pointer target. Control and icon sizes derive from the spacing seed.

TokenPreviewValueDescription--tp-control-height-xsvar(--tp-control-height-xs)Block size of extra-small single-line controls.--tp-control-height-smvar(--tp-control-height-sm)Block size of small single-line controls.--tp-control-height-mdvar(--tp-control-height-md)Block size of default single-line controls.--tp-control-height-lgvar(--tp-control-height-lg)Block size of large single-line controls.--tp-icon-size-xsvar(--tp-icon-size-xs)Extra-small icons, such as icons inside badges.--tp-icon-size-smvar(--tp-icon-size-sm)Small icons.--tp-icon-size-mdvar(--tp-icon-size-md)Default icon extent.--tp-icon-size-lgvar(--tp-icon-size-lg)Large icons.--tp-target-size-minvar(--tp-target-size-min)Minimum pointer target. Smaller controls extend their hit area to it on touch; it is never a visual size.

Border and focus

Line widths and style for borders, and the focus ring geometry.

TokenPreviewValueDescription--tp-border-widthvar(--tp-border-width)Default width of borders and separators.--tp-border-width-strongvar(--tp-border-width-strong)Heavier line for emphasis, at least the default width.--tp-joined-edge-widthvar(--tp-joined-edge-width)Width of the edge between joined slots, such as one-time code slots; the flat appearance widens the cut.--tp-border-stylevar(--tp-border-style)Line style of borders.--tp-ring-widthvar(--tp-ring-width)Width of the focus ring.--tp-ring-offsetvar(--tp-ring-offset)Gap between an element and its focus ring.

Radius

Corner rounding. Every step derives from the radius seed, so changing it reshapes the whole set.

TokenPreviewValueDescription--tp-radius-smvar(--tp-radius-sm)Smallest corner, for small inner elements.--tp-radius-mdvar(--tp-radius-md)Compact controls and items inside surfaces.--tp-radius-lgvar(--tp-radius-lg)Default corner of controls and surfaces; equal to the seed.--tp-radiusvar(--tp-radius)Seed of the radius scale. Every other step multiplies it.--tp-radius-xlvar(--tp-radius-xl)Larger surfaces such as dialogs and code blocks.--tp-radius-2xlvar(--tp-radius-2xl)Large rounded surfaces such as toasts.--tp-radius-3xlvar(--tp-radius-3xl)Very large rounded surfaces.--tp-radius-4xlvar(--tp-radius-4xl)Largest derived corner.--tp-radius-fullvar(--tp-radius-full)Circles and pills.

Shadow

Elevation, from flat to the highest overlay.

TokenPreviewValueDescription--tp-shadow-nonevar(--tp-shadow-none)No elevation.--tp-shadow-smvar(--tp-shadow-sm)Slight lift for raised controls and selected tabs.--tp-shadow-mdvar(--tp-shadow-md)Floating surfaces such as popovers and select lists.--tp-shadow-lgvar(--tp-shadow-lg)Highest lift for menus and large overlays.

Opacity

State opacities for disabled content and modal backdrops.

TokenPreviewValueDescription--tp-opacity-disabledvar(--tp-opacity-disabled)Disabled controls and content.--tp-opacity-backdropvar(--tp-opacity-backdrop)Strength of the modal backdrop behind dialogs and drawers.

Motion

Durations and easing curves of default motion. Durations are multiplied by the motion scale, so reduced motion makes them instant.

TokenPreviewValueDescription--tp-duration-fastvar(--tp-duration-fast)Feedback: color, fill, track and thumb changes, and dialog fades.--tp-duration-normalvar(--tp-duration-normal)Anchored surfaces, panels, layout changes and viewport moves.--tp-duration-slowvar(--tp-duration-slow)Reveals and hover zoom.--tp-easing-standardvar(--tp-easing-standard)State changes and movement within the page.--tp-easing-entervar(--tp-easing-enter)Arrivals: opening surfaces, reveals and items settling into place.--tp-easing-exitvar(--tp-easing-exit)Departures: closing surfaces.