Skip to content
SuperCoach

Elevation

Elevation shows what sits on top of what. coach-admin had 225 different shadows; the system has six, all in the same ink, and nine named layers instead of 44 z-index values.

Shadows

  • shadow-xs

    Outline buttons, inputs: a hint of depth on a flat surface.

  • shadow-sm

    Cards at rest, segmented controls.

  • shadow-md

    Cards on hover, sticky table headers when scrolled.

  • shadow-lg

    Dropdown menus, popovers, sheets.

  • shadow-xl

    Dialogs.

  • shadow-2xl

    Large overlays such as the command palette or onboarding.

  • A shadow means the surface is above the page: it floats, it can move, or it covers something. Don't add shadows for decoration.
  • Higher surfaces get larger shadows. A menu (shadow-lg) opened from a card (shadow-sm) reads as above it.
  • On a colored or dark surface, rely on borders and contrast, not shadows.

Layers

Use a named layer, never a raw number: z-(--z-modal), not z-50.

LayerUse
baseNormal flow
raisedAn item lifted within its group
stickySticky headers, sticky table headers
dropdownMenus and select lists
overlayThe scrim behind dialogs and sheets
modalDialogs and sheets
popoverPopovers and tooltips. Above modals, so they also work inside a dialog
toastToasts, above everything the app owns
maxThird-party widgets only, such as Intercom

Related: Motion, Shadow tokens, Z-index tokens.