On this page

Elevation

How far a surface seems to sit above the page. It sets items apart, marks what is temporary and points attention at what matters now.

Elevation is the distance a surface seems to have from the page, shown with a shadow and, in dark mode, a lighter background. It tells people what stands apart from the page, what is temporary, and what needs attention first.

From the front: the shadow grows with the height.
From the side: three heights above the page.

How it works

  • Each level is a pair: a background and a shadow. Use the two tokens of a level together.
  • The further from the page, the larger and softer the shadow. A card has a faint shadow; a dialog a deep one.
  • Three shadow levels only. If everything floats, nothing stands out.

Elevation shows how high a surface looks. Z-index decides which surface is drawn on top.

Level Background Shadow Use for
Page color.surface.page, color.surface.subtle none The page, the app header and side navigation, panels and tables; table headers on color.surface.subtle
Raised color.surface elevation.shadow.raised Cards
Overlay color.surface.overlay elevation.shadow.overlay Menus, select lists, popovers, date pickers, toasts
Modal color.surface.overlay elevation.shadow.modal Dialogs, drawers, full sheets

Page

Most of the screen sits on the page with no shadow. Separate panels and tables with a color.border border. The app header and side navigation sit on the page too, separated by a color.border line. Table headers use color.surface.subtle.

Raised

For one item people treat as a unit: a sync job, a connection, a dashboard widget. Cards keep their border, because a faint shadow can disappear on a bright screen or in high-contrast mode.

Store A → ERPRunning · 2 min ago

Overlay

For things that open from a control and close again: menus, select lists, popovers. Toasts use the same surface and shadow.

ActionsRun nowPauseEdit mapping
Sync started for 3 jobs

For dialogs and drawers that block the page until people finish or cancel. A modal always sits on color.surface.scrim, which dims the page and shows it is unavailable.

Dark mode

The higher the surface, the lighter it is. A dark shadow barely shows on a dark page, so each level also gets a lighter background: page graphite 1, cards graphite 2, menus and dialogs graphite 3. The token names are the same in both themes.

Light
Store A → ERPRunning · 2 min ago
Run nowPause
Dark
Store A → ERPRunning · 2 min ago
Run nowPause

Inside menus and dialogs

Rows inside a floating surface use the overlay state colours, such as color.surface.overlay.hover. The page’s hover colour would match the menu background in dark mode and disappear. Mark a selected row with a check, not colour alone.

Light
CRMMarketplaceERPWarehouse
Dark
CRMMarketplaceERPWarehouse

Do and don’t

Do
Run nowPauseEdit mapping

Inside a menu, use the overlay state colours, such as color.surface.overlay.hover.

Don’t
Run nowPauseEdit mapping

Don’t use the page’s hover colour inside a menu. In dark mode it is the same colour as the menu, so the hovered row disappears.

Do
Sync logs128 orders today

Keep panels, tables and page sections flat. A border is enough to separate them.

Don’t
Sync logs128 orders today

Don’t give every panel a shadow. When everything floats, nothing stands out.

Do
Run nowPauseEdit mapping

Use the shadow token for the level. It changes with the theme.

Don’t
Run nowPauseEdit mapping

Don’t write your own shadow or stack two tokens. It stays dark grey in dark mode and matches no level.

Do
Run nowPauseEdit mapping

Let the surface and the shadow set the menu apart.

Don’t
Run nowPauseEdit mapping

Don’t add a border to a menu, popover or dialog.

Tokens

TokenValueDescription
--bh-elevation-shadow-raised0 1px 2px rgb(43 42 40 / 8%), 0 1px 3px rgb(43 42 40 / 6%)Dark: 0 1px 2px rgb(0 0 0 / 40%), 0 1px 3px rgb(0 0 0 / 30%)Cards, including cards that only show content, and a card being dragged. Stronger in dark mode.
--bh-elevation-shadow-overlay0 4px 12px rgb(43 42 40 / 15%)Dark: 0 4px 12px rgb(0 0 0 / 50%)Dropdowns, menus, popovers, select lists and toasts. Pair with color.surface.overlay.
--bh-elevation-shadow-modal0 8px 24px rgb(43 42 40 / 15%)Dark: 0 8px 24px rgb(0 0 0 / 50%)Dialogs, drawers and full sheets that sit on the scrim. Pair with color.surface.overlay.
  • Z-index: which surface is drawn on top.
  • Opacity: the scrim behind dialogs and drawers.
  • Color usage: surface and background tokens.
TokenValueDescription
--bh-color-surface-overlay{color.brand.white}#ffffffDark: {color.graphite.3} → #282827Menus, popovers, select lists, toasts, dialogs and drawers. One step lighter than color.surface in dark, so a floating layer reads above cards.
--bh-color-surface-overlay-hover{color.graphite.2}#f1f1f0Dark: {color.graphite.4} → #31302fMenu item or option on hover, inside color.surface.overlay.
--bh-color-surface-overlay-pressed{color.graphite.3}#e5e5e4Dark: {color.graphite.5} → #393937Menu item or option when pressed, inside color.surface.overlay.
--bh-color-surface-overlay-selected{color.graphite.3}#e5e5e4Dark: {color.graphite.5} → #393937Selected option inside color.surface.overlay. Always add a second cue: a check or bold text.
--bh-color-surface-overlay-selected-hover{color.graphite.4}#d9d9d8Dark: {color.graphite.5} → #393937Selected option on hover, inside color.surface.overlay. In dark it stays on graphite 5, as graphite 6 fails text and border contrast; the check mark carries the state.