Skip to content

ExpressiveCSS

Browse documentation

Design tokens

Every token family in one place: color, type, state, motion, shape, elevation and stacking.

View as Markdown

Every design decision in the framework is a CSS custom property, so you can override it at runtime without a rebuild. System tokens use Material 3 names (--md-sys-* and --md-ref-*). Components read them through their own --md-comp-* tokens, which you set to change one component at a time.

Token families

FamilyPrefixWhat it holdsDetails
Color roles--md-sys-color-*45 roles, such as primary, on-surface and outline-variant. Each has a -light and -dark pairColor
Tonal palettes--md-ref-palette-*Tones 0 to 100 of the primary, secondary, tertiary, neutral, neutral-variant and error ramps, generated from --md-sourceThemes
Contrast levelscontrast="medium" | "high"This is an attribute, not a token. It moves accents, outlines and on-surface-variant to higher-contrast tonesThemes
Type scale--md-sys-typescale-*Font, size, weight, line height and tracking for the fifteen roles, and --md-ref-typeface-*Typography
State layers--md-sys-state-*Hover, focus, pressed and dragged opacitiesState layers
Motion--md-sys-motion-*Seven easing curves and sixteen durations, short1 to extra-long4Transitions
Shape--md-sys-shape-corner-*The corner scale from none to fullShapes
Elevation--md-sys-elevation-level*Shadows for levels 0 to 5 and 1-halfElevation
Stacking--expressive-z-*The z-index order of fixed and floating surfacesElevation

Overriding

Set a system token on :root to change every component, or on any element to change only what is inside it. Each token is declared on :root and :host, so the same overrides work when a shadow root adopts the stylesheet.

<style>
  :root {
    --md-source: #006495;                   /* re-themes every color role */
    --md-sys-shape-corner-medium: 8px;      /* squarer cards and menus */
    --md-sys-motion-duration-short4: 150ms; /* faster 200ms transitions */
  }
  .dense-panel { --md-sys-elevation-level1: none; }
  .my-card { --md-comp-card-container-shape: 0; }  /* one component */
</style>

No matching pages

  • Source color

    The seed every generated ramp derives from. Pick one and browse the docs — the whole theme follows. Error does not: it is a fixed hue.

    Default source: Mist Iris.

    ExpressiveCSS presets: Lagoon, Harbor, Breeze, Cobalt, Iris.

    Bold

    Soft

    Mist

    Glow