var(--mds-elevation-<n>)), never a hand-written box-shadow.Depth communicates hierarchy — the higher a surface’s elevation, the more it stands out as temporary or focal (a menu over a page, a dialog over everything). Low elevation grounds content — small, subtle shadows create gentle depth while keeping a surface connected to the primary content it belongs to, such as content containers and resting cards. High elevation creates a focal point — larger shadows lift transient, attention-worthy surfaces clearly above the page, such as dialogs, popovers, and secondary windows. A fixed scale, not free-form shadows — there are four steps; pick the one that matches the surface’s altitude rather than tuning offsets and blur by hand. Restraint — most UI sits flat. Reserve elevation for surfaces that genuinely float above the content.
x y blur spread color). Offset and blur
grow with altitude:elevation.1 | |
elevation.2 | |
elevation.3 | |
elevation.4 |
packages/assets/tokens/src/core/elevation.json..mds-elevation selector) rather than per theme, so the same
dark, semi-transparent shadow is used in light, dark, and high-contrast modes.
Because the shadow is a translucent black, it reads correctly over most
backgrounds without flipping. See Match the step to the surface’s altitude, not to a desired shadow look. Floating overlays use elevation.3; deeper stacking (rare) useselevation.4.Do not hand-roll box-shadowor override a token’s offsets to fake a new level — that fragments the scale and drifts from the system.Pair elevation with the right surface token (see Color —background.solid.*). Elevation provides the shadow; the surface token provides the fill.For translucent, blurred depth (rather than a cast shadow), use the Glass material and blur tokens instead.
banner, dialog, popover, slider, and toast — all
via elevation.3 for their floating surfaces.Color — surface fills that elevation shadows sit on.Theming — why elevation, unlike color, does not change per theme.Glass — the alternative, translucent approach to depth.