Skip to content
Playground

Elevation

Semantic surfaces and shadows for expressing depth and hierarchy.

Elevation describes how a surface relates to the content around it. Zenos pairs semantic surface colors with restrained shadows so the same hierarchy remains clear in light and dark themes.

Level −1

sunken

Recessed regions

Level 0

surface

Page surface

Level +1

container

Grouped content

Level +2

raised

Floating controls

Level +3

overlay

Temporary layers

LevelPurposeShadow
sunkenRecessed wells, inset regions, and work areasNone
surfaceThe standard application content planeNone
containerSubtle grouping within the current surfaceNone
raisedPersistent content lifted above nearby contentraised
overlayTemporary UI above the application hierarchyoverlay

Use the lowest level that communicates the relationship. A border may clarify a boundary, but it should not replace elevation when depth is meaningful.

Raised and overlay treatments combine two token families:

CSS
.raised-surface {  background: var(--elevation-surface-raised-default);  box-shadow: var(--elevation-shadow-raised);} .overlay-surface {  background: var(--elevation-surface-overlay-default);  box-shadow: var(--elevation-shadow-overlay);}
TokenRole
--elevation-surface-sunken-defaultRecessed surface color
--elevation-surface-defaultBase content surface
--elevation-surface-container-defaultGrouped container surface
--elevation-surface-raised-defaultRaised surface color
--elevation-surface-overlay-defaultOverlay surface color
--elevation-shadow-raisedCompact raised shadow
--elevation-shadow-overlayStrong overlay shadow
--elevation-shadow-overflowScroll and overflow boundary cue

Surface roles also provide hover and pressed values where interaction applies. Prefer the Box elevation prop for normal composition; use tokens directly when styling application-specific surfaces.

Zenos exposes the semantic elevation values to Tailwind:

TSX
<aside className="bg-elevation-surface-raised shadow-raised">  Raised content</aside> <div className="bg-elevation-surface-overlay shadow-overlay">  Overlay content</div>

Dark mode changes both the surface colors and shadow construction. Overlay shadows gain a subtle perimeter so dark surfaces remain distinguishable without relying on a bright border. Use semantic tokens and utilities rather than copying the light-theme shadow values.

  • Keep page content on surface or sunken levels.
  • Use container to group related information without implying interactivity.
  • Use raised for persistent floating controls and lifted cards.
  • Reserve overlay for popovers, menus, dialogs, and similar temporary layers.
  • Do not communicate focus, selection, or validation through elevation alone.

Elevation controls visual depth only. Positioning, stacking context, focus management, and overlay behavior remain the responsibility of the relevant component or application layout.