Elevation
Flat surfaces separated by hairlines. A raised surface marks what is active, and only overlays cast a shadow.
On this page
Levels
| Level | Token | Used for |
|---|---|---|
| Recessed | --surface | Wells and inputs, and the hover state of a row |
| Page | --bg | The one continuous surface everything sits on |
| Raised | --bk-selected-background (the elevated surface) | The active item: the current page, with the accent on its icon (--bk-action-text), or the chosen segment, ringed in --bk-selected-indicator |
| Overlay | --surface-elevated with a --border-bright hairline and --shadow-floating | Menus, popovers, dialogs, tooltips and toasts |
| Token | Night | Dusk | Day | Bright |
|---|---|---|---|---|
--bgPage | #000000 | #0B0C0F | #F2F3F5 | #FFFFFF |
--surfaceRecessed, hover | #14100A | #15161A | #FFFFFF | #ECEEF1 |
--surface-elevatedRaised, overlay | #221A10 | #202127 | #FFFFFF | #FFFFFF |
--borderHairline between regions | #3A2C16 | #26272E | #D5D8DD | #C9CDD4 |
--border-brightHairline around overlays | #523D1E | #33353D | #B9BEC6 | #AAB0B9 |
Interaction states
A row moves through the levels as it is used. Hover lightens it to the recessed surface; the active row is raised; keyboard focus adds a 2px accent ring, which is never removed.
Surface and stacking are separate
A lighter surface does not place an element above its neighbors. Surface roles describe appearance; the
--bk-layer-* roles in layers.css determine stacking order. A report panel can have a tinted background
without becoming an overlay or receiving a shadow.
| Region | Layer role |
|---|---|
| Ordinary page content | --bk-layer-content |
| Sticky in-page controls | --bk-layer-sticky |
| Menus, lists and popovers | --bk-layer-dropdown; one step above the modal when opened from a dialog (data-over-dialog), above the toast when opened from one (data-over-toast) |
| Overlay backdrop and modal | --bk-layer-overlay, --bk-layer-modal |
| Tooltip and toast | --bk-layer-tooltip, --bk-layer-toast |
| Display dimming and alert presentation | --bk-layer-dimmer, --bk-layer-alert |
| The shell's header, with the alert zone | --bk-layer-alert, whether or not it sticks |
| The brightness menu | --layer-alert-popover, one step above the alert layer |
Use the shared overlay component so its portal receives the trigger's theme, language and size scope. Increasing a local z-index cannot escape an ancestor stacking context or overflow clipping. Keep the alert zone and brightness recovery reachable in the application shell.
Documents and diagram canvases
Use spacing and a quiet rule to separate report sections. Editorial panels can use categorical tints with
labels, while diagrams use --bk-diagram-canvas and --bk-diagram-group. A group in a drawing represents a
system boundary, not a menu floating over the page. Avoid copying a diagram's paper color into surrounding UI.
Check overlays in all four themes, above nested cards and near screen edges. The token --shadow-floating
supplies the shared floating shadow; confirm the border is visible where a dark-theme shadow is subtle. In Night
--shadow-floating is a 1px line in place of a shadow, so an overlay's edge is its border and that line; check it
there first.