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.
--tp-backgroundvar(--tp-background)--tp-foregroundvar(--tp-foreground)--tp-cardvar(--tp-card)--tp-card-foregroundvar(--tp-card-foreground)--tp-popovervar(--tp-popover)--tp-popover-foregroundvar(--tp-popover-foreground)--tp-primaryvar(--tp-primary)--tp-primary-foregroundvar(--tp-primary-foreground)--tp-secondaryvar(--tp-secondary)--tp-secondary-foregroundvar(--tp-secondary-foreground)--tp-mutedvar(--tp-muted)--tp-muted-foregroundvar(--tp-muted-foreground)--tp-accentvar(--tp-accent)--tp-accent-foregroundvar(--tp-accent-foreground)--tp-destructivevar(--tp-destructive)--tp-destructive-foregroundvar(--tp-destructive-foreground)--tp-successvar(--tp-success)--tp-success-foregroundvar(--tp-success-foreground)--tp-warningvar(--tp-warning)--tp-warning-foregroundvar(--tp-warning-foreground)--tp-primary-subtlevar(--tp-primary-subtle)--tp-primary-subtle-foregroundvar(--tp-primary-subtle-foreground)--tp-primary-bordervar(--tp-primary-border)--tp-destructive-subtlevar(--tp-destructive-subtle)--tp-destructive-subtle-foregroundvar(--tp-destructive-subtle-foreground)--tp-destructive-bordervar(--tp-destructive-border)--tp-success-subtlevar(--tp-success-subtle)--tp-success-subtle-foregroundvar(--tp-success-subtle-foreground)--tp-success-bordervar(--tp-success-border)--tp-warning-subtlevar(--tp-warning-subtle)--tp-warning-subtle-foregroundvar(--tp-warning-subtle-foreground)--tp-warning-bordervar(--tp-warning-border)--tp-bordervar(--tp-border)--tp-edgevar(--tp-edge)--tp-hairlinevar(--tp-hairline)--tp-inputvar(--tp-input)--tp-controlvar(--tp-control)--tp-control-strongvar(--tp-control-strong)--tp-control-bordervar(--tp-control-border)--tp-choicevar(--tp-choice)--tp-choice-foregroundvar(--tp-choice-foreground)--tp-ringvar(--tp-ring)--tp-chart-1var(--tp-chart-1)--tp-chart-2var(--tp-chart-2)--tp-chart-3var(--tp-chart-3)--tp-chart-4var(--tp-chart-4)--tp-chart-5var(--tp-chart-5)Syntax color
One color per lexical scope of highlighted code.
--tp-syntax-commentvar(--tp-syntax-comment)--tp-syntax-keywordvar(--tp-syntax-keyword)--tp-syntax-stringvar(--tp-syntax-string)--tp-syntax-numbervar(--tp-syntax-number)--tp-syntax-functionvar(--tp-syntax-function)--tp-syntax-typevar(--tp-syntax-type)--tp-syntax-constantvar(--tp-syntax-constant)--tp-syntax-variablevar(--tp-syntax-variable)--tp-syntax-propertyvar(--tp-syntax-property)--tp-syntax-tagvar(--tp-syntax-tag)--tp-syntax-attributevar(--tp-syntax-attribute)--tp-syntax-operatorvar(--tp-syntax-operator)--tp-syntax-insertedvar(--tp-syntax-inserted)--tp-syntax-deletedvar(--tp-syntax-deleted)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.
--tp-content-grayvar(--tp-content-gray)--tp-content-gray-foregroundvar(--tp-content-gray-foreground)--tp-content-brownvar(--tp-content-brown)--tp-content-brown-foregroundvar(--tp-content-brown-foreground)--tp-content-orangevar(--tp-content-orange)--tp-content-orange-foregroundvar(--tp-content-orange-foreground)--tp-content-yellowvar(--tp-content-yellow)--tp-content-yellow-foregroundvar(--tp-content-yellow-foreground)--tp-content-greenvar(--tp-content-green)--tp-content-green-foregroundvar(--tp-content-green-foreground)--tp-content-bluevar(--tp-content-blue)--tp-content-blue-foregroundvar(--tp-content-blue-foreground)--tp-content-purplevar(--tp-content-purple)--tp-content-purple-foregroundvar(--tp-content-purple-foreground)--tp-content-pinkvar(--tp-content-pink)--tp-content-pink-foregroundvar(--tp-content-pink-foreground)--tp-content-redvar(--tp-content-red)--tp-content-red-foregroundvar(--tp-content-red-foreground)Spacing
Padding, gaps and margins. Every step is the spacing seed times its number; a trailing -5 is the half step.
--tp-spacingvar(--tp-spacing)--tp-space-0var(--tp-space-0)--tp-space-0-5var(--tp-space-0-5)--tp-space-1var(--tp-space-1)--tp-space-1-5var(--tp-space-1-5)--tp-space-2var(--tp-space-2)--tp-space-2-5var(--tp-space-2-5)--tp-space-3var(--tp-space-3)--tp-space-4var(--tp-space-4)--tp-space-5var(--tp-space-5)--tp-space-6var(--tp-space-6)--tp-space-8var(--tp-space-8)--tp-space-10var(--tp-space-10)--tp-space-12var(--tp-space-12)--tp-space-16var(--tp-space-16)Font family
Typefaces for interface text, headings and code.
--tp-font-sansvar(--tp-font-sans)--tp-font-headingvar(--tp-font-heading)--tp-font-monovar(--tp-font-mono)Font size
Type scale, from the smallest text to page titles.
--tp-text-xsvar(--tp-text-xs)--tp-text-smvar(--tp-text-sm)--tp-text-basevar(--tp-text-base)--tp-text-lgvar(--tp-text-lg)--tp-text-xlvar(--tp-text-xl)--tp-text-2xlvar(--tp-text-2xl)Font weight
Weights for body text, labels, titles and strong emphasis.
--tp-font-normalvar(--tp-font-normal)--tp-font-mediumvar(--tp-font-medium)--tp-font-semiboldvar(--tp-font-semibold)--tp-font-boldvar(--tp-font-bold)Line height
Line heights as multiples of the font size.
--tp-leading-tightvar(--tp-leading-tight)--tp-leading-normalvar(--tp-leading-normal)--tp-leading-relaxedvar(--tp-leading-relaxed)Letter spacing
Letter spacing relative to the font size.
--tp-tracking-tightvar(--tp-tracking-tight)--tp-tracking-normalvar(--tp-tracking-normal)--tp-tracking-widevar(--tp-tracking-wide)Size
Block size of single-line controls, icon extents and the minimum pointer target. Control and icon sizes derive from the spacing seed.
--tp-control-height-xsvar(--tp-control-height-xs)--tp-control-height-smvar(--tp-control-height-sm)--tp-control-height-mdvar(--tp-control-height-md)--tp-control-height-lgvar(--tp-control-height-lg)--tp-icon-size-xsvar(--tp-icon-size-xs)--tp-icon-size-smvar(--tp-icon-size-sm)--tp-icon-size-mdvar(--tp-icon-size-md)--tp-icon-size-lgvar(--tp-icon-size-lg)--tp-target-size-minvar(--tp-target-size-min)Border and focus
Line widths and style for borders, and the focus ring geometry.
--tp-border-widthvar(--tp-border-width)--tp-border-width-strongvar(--tp-border-width-strong)--tp-joined-edge-widthvar(--tp-joined-edge-width)--tp-border-stylevar(--tp-border-style)--tp-ring-widthvar(--tp-ring-width)--tp-ring-offsetvar(--tp-ring-offset)Radius
Corner rounding. Every step derives from the radius seed, so changing it reshapes the whole set.
--tp-radius-smvar(--tp-radius-sm)--tp-radius-mdvar(--tp-radius-md)--tp-radius-lgvar(--tp-radius-lg)--tp-radiusvar(--tp-radius)--tp-radius-xlvar(--tp-radius-xl)--tp-radius-2xlvar(--tp-radius-2xl)--tp-radius-3xlvar(--tp-radius-3xl)--tp-radius-4xlvar(--tp-radius-4xl)--tp-radius-fullvar(--tp-radius-full)Shadow
Elevation, from flat to the highest overlay.
--tp-shadow-nonevar(--tp-shadow-none)--tp-shadow-smvar(--tp-shadow-sm)--tp-shadow-mdvar(--tp-shadow-md)--tp-shadow-lgvar(--tp-shadow-lg)Opacity
State opacities for disabled content and modal backdrops.
--tp-opacity-disabledvar(--tp-opacity-disabled)--tp-opacity-backdropvar(--tp-opacity-backdrop)Motion
Durations and easing curves of default motion. Durations are multiplied by the motion scale, so reduced motion makes them instant.
--tp-duration-fastvar(--tp-duration-fast)--tp-duration-normalvar(--tp-duration-normal)--tp-duration-slowvar(--tp-duration-slow)--tp-easing-standardvar(--tp-easing-standard)--tp-easing-entervar(--tp-easing-enter)--tp-easing-exitvar(--tp-easing-exit)