Design Tokens

Core design values that define the visual foundation of the design system. This page turns the token reference into a practical visual showcase so semantic roles, type styles, spacing, motion, and shape choices are easier to evaluate in context.

How to Read This Page

Tokens work best when shown as relationships, not isolated values. Color roles are presented as semantic pairs, typography is shown as complete specimens with line-height and tracking, and system utilities like spacing and size are shown as reusable scales.

Semantic first Use --md-sys-* roles in components instead of hardcoded values.
Utilities stay global Use --ds-space-* and --ds-size-* for rhythm and control sizing.
Pairs matter on-* roles are foreground tokens and should be previewed on their matching surfaces.

Color Roles

These previews show background and foreground roles together. This is the correct way to evaluate semantic color relationships.

Brand and Feedback Pairs

Primary action Used for prominent calls to action and emphasis.
Primary / On Primary
--md-sys-color-primary + --md-sys-color-on-primary
Primary container Used for standout containers with lower intensity.
Primary Container Pair
--md-sys-color-primary-container + --md-sys-color-on-primary-container
Secondary Used for supporting emphasis and alternate actions.
Secondary Pair
--md-sys-color-secondary + --md-sys-color-on-secondary
Tertiary container Useful for complementary accents and differentiated sections.
Tertiary Container Pair
--md-sys-color-tertiary-container + --md-sys-color-on-tertiary-container
Error Reserved for validation, destructive actions, and critical feedback.
Error Pair
--md-sys-color-error + --md-sys-color-on-error
Error container Use for inline error panels or supportive validation messaging.
Error Container Pair
--md-sys-color-error-container + --md-sys-color-on-error-container

Surface Hierarchy

Surface
--md-sys-color-surface / --md-sys-color-on-surface
Surface Container Low
--md-sys-color-surface-container-low
Surface Container
--md-sys-color-surface-container
Surface Container High
--md-sys-color-surface-container-high
Surface Container Highest
--md-sys-color-surface-container-highest
Inverse Surface
--md-sys-color-inverse-surface / --md-sys-color-inverse-on-surface

Typography Scale

These specimens show the real type tokens with line-height and tracking so the hierarchy can be judged at a glance.

Display Large

Display Large
57 / 64 / 400 / -0.25px
Hero headlines and expressive top-level statements.

Headline Large

Headline Large
32 / 40 / 400
Page titles, major section headers, and dialogs.

Headline Medium

Headline Medium
28 / 36 / 400
Section starts, feature blocks, and secondary headlines.

Title Large

Title Large
22 / 28 / 400
Cards, panels, and grouped content headers.

Title Medium

Title Medium
16 / 24 / 500 / 0.15px
Compact headers, form groups, and emphasized labels.

Body Large supports comfortable reading and UI explanation.

Body Large
16 / 24 / 400 / 0.5px
Primary paragraph text and descriptive UI copy.

Body Medium is used for compact supporting text and list detail.

Body Medium
14 / 20 / 400 / 0.25px
Supporting copy, helper text, and concise descriptions.

Label Large

Label Large
14 / 20 / 500 / 0.1px
Buttons, tabs, compact controls, and actionable UI labels.

Spacing and Size Utilities

Layout rhythm and control density come from the global utility token set. These are shared across multiple components and should stay consistent across the system.

Spacing Scale

Space 2
--ds-space-2 / 8px
Space 3
--ds-space-3 / 12px
Space 4
--ds-space-4 / 16px
Space 6
--ds-space-6 / 24px
Space 8
--ds-space-8 / 32px
Space 12
--ds-space-12 / 48px

Interactive Size Tokens

Icon Scale
--ds-size-icon-sm / 14px
--ds-size-icon-md / 18px
--ds-size-icon-lg / 24px
Control Scale
--ds-size-control-sm / 32px
--ds-size-control-md / 40px
--ds-size-control-lg / 48px
Hit Area
--ds-size-hit-area / 40px
Use this as the minimum comfortable touch target.

Shape and Elevation

Shape tokens define corner personality while elevation tokens define depth and surface hierarchy.

Shape Scale

None
--ds-radius-none / 0px
Small
--ds-radius-sm / 4px
Medium
--ds-radius-md / 8px
Large
--ds-radius-lg / 16px
Extra Large
--ds-radius-xl / 24px
Full
--ds-radius-full / 9999px

Elevation Levels

Level 0 No elevation
--md-sys-elevation-level0
Level 1 Resting cards and small raised surfaces
--md-sys-elevation-level1
Level 2 Hover states, elevated controls, and stronger separation
--md-sys-elevation-level2
Level 3 Menus, raised panels, and active overlays
--md-sys-elevation-level3
Level 4 Prominent overlays and high-emphasis floating surfaces
--md-sys-elevation-level4
Level 5 Dialogs and topmost surfaces
--md-sys-elevation-level5

Motion and State Layers

Motion tokens establish tempo, while state-layer tokens define the amount of interaction feedback applied to a surface.

Motion Tokens

Short Duration
--md-sys-motion-duration-short2 = 100ms
Use for hover, pressed, and small state changes.
Medium Duration
--md-sys-motion-duration-medium3 = 350ms
Use for panels, sheets, and moderate transitions.
Standard Easing
cubic-bezier(0.2, 0, 0, 1)
Default easing for general movement and state change.
Emphasized Decelerate
cubic-bezier(0.05, 0.7, 0.1, 1)
Use when surfaces enter the screen or expand into view.

State Layer Opacities

Hover
--md-sys-state-hover-opacity / 0.08
Focus
--md-sys-state-focus-opacity / 0.12
Pressed
--md-sys-state-pressed-opacity / 0.12
Dragged
--md-sys-state-dragged-opacity / 0.16

Usage Example

Foundation tokens should be combined semantically. A surface should pair its background, text color, spacing, radius, and elevation instead of mixing unrelated values.

.token-card {
  background: var(--md-sys-color-surface-container-low);
  color: var(--md-sys-color-on-surface);
  padding: var(--ds-space-4);
  border-radius: var(--ds-radius-md);
  box-shadow: var(--md-sys-elevation-level1);
  transition:
    box-shadow var(--md-sys-motion-duration-short2)
      var(--md-sys-motion-easing-standard),
    background-color var(--md-sys-motion-duration-short2)
      var(--md-sys-motion-easing-standard);
}