Elevation

Elevation says how far a surface sits above the page. Seven steps up, one that casts upward, all tinted with the Matrix warm neutral.

Usage

/* Elevation is one property: box-shadow, from a token.
   Steps xs · sm · md · lg · xl · 2xl · 3xl, plus the upward xs-top. */
.panel {
  box-shadow: var(--elevation-lg);
}
// The same steps as Tailwind utilities
<div className="rounded-xl bg-popover shadow-lg" />

Click a token or class in the tables to copy it.

Shadow scale

TokenExampleValue
0 1px 2px 0 rgb(36 35 35 / 0.05)
0 1px 2px 0 rgb(36 35 35 / 0.06), 0 1px 3px 0 rgb(36 35 35 / 0.1)
0 2px 4px -2px rgb(36 35 35 / 0.06), 0 4px 8px -2px rgb(36 35 35 / 0.1)
0 2px 2px -1px rgb(36 35 35 / 0.04), 0 4px 6px -2px rgb(36 35 35 / 0.03), 0 12px 16px -4px rgb(36 35 35 / 0.08)
0 3px 3px -1.5px rgb(36 35 35 / 0.04), 0 8px 8px -4px rgb(36 35 35 / 0.03), 0 20px 24px -4px rgb(36 35 35 / 0.08)
0 4px 4px -2px rgb(36 35 35 / 0.04), 0 24px 48px -12px rgb(36 35 35 / 0.18)
0 5px 5px -2.5px rgb(36 35 35 / 0.04), 0 32px 64px -12px rgb(36 35 35 / 0.14)

xs rests on form controls · lg lifts the overlays (menus, popovers, tooltips) · xl is the dialog, the only surface that goes higher.

Directional

TokenExampleValue
0 -1px 2px 0 rgb(36 35 35 / 0.05)

The xs shadow inverted, for a surface anchored to the bottom edge of the viewport, like the chat composer on mobile.

Guidelines

  • Use a token, never a hand-written box-shadow; the warm ink color is part of the scale.
  • Let elevation follow the surface: resting controls xs, overlays lg, dialogs xl.
  • Elevation is not emphasis. To make something matter more, use hierarchy and space, not a bigger shadow.
  • Don't stack a shadow on a surface that already has one; the outer container owns the elevation.
  • Prefer xs, lg or xl. The other steps exist for rare cases; reach for them only when none of the three fit.
  • Cards on the page separate by a border first (see Colors); add xs only when the card must read as raised.
  • Don't add directional shadows beyond xs-top; elevation in another direction is a layout question, not a new token.