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
Levels
Section titled “Levels”| Level | Purpose | Shadow |
|---|---|---|
sunken | Recessed wells, inset regions, and work areas | None |
surface | The standard application content plane | None |
container | Subtle grouping within the current surface | None |
raised | Persistent content lifted above nearby content | raised |
overlay | Temporary UI above the application hierarchy | overlay |
Use the lowest level that communicates the relationship. A border may clarify a boundary, but it should not replace elevation when depth is meaningful.
Surface and shadow tokens
Section titled “Surface and shadow tokens”Raised and overlay treatments combine two token families:
.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);}| Token | Role |
|---|---|
--elevation-surface-sunken-default | Recessed surface color |
--elevation-surface-default | Base content surface |
--elevation-surface-container-default | Grouped container surface |
--elevation-surface-raised-default | Raised surface color |
--elevation-surface-overlay-default | Overlay surface color |
--elevation-shadow-raised | Compact raised shadow |
--elevation-shadow-overlay | Strong overlay shadow |
--elevation-shadow-overflow | Scroll 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.
Tailwind utilities
Section titled “Tailwind utilities”Zenos exposes the semantic elevation values to Tailwind:
<aside className="bg-elevation-surface-raised shadow-raised"> Raised content</aside> <div className="bg-elevation-surface-overlay shadow-overlay"> Overlay content</div>Dark mode
Section titled “Dark mode”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.
Usage guidance
Section titled “Usage guidance”- Keep page content on
surfaceorsunkenlevels. - Use
containerto group related information without implying interactivity. - Use
raisedfor persistent floating controls and lifted cards. - Reserve
overlayfor 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.