Elevation
Generated from DESIGN_SYSTEM.md
Rules
Prefer no shadow. Use background contrast and border to separate layers. Add shadow only when a surface needs to communicate that it floats above others (modal, tooltip, FAB).
| Level | Use | Web | iOS (AppTheme.Elevation) | Android |
|---|---|---|---|---|
none | Flat cards on differentiated background | border border-line | border-only via cardSurface() | tonalElevation(0) |
subtle | Subtle lift on interactive inputs | shadow-sm | subtle (4% black, 4pt radius) | tonalElevation(1) |
card | Cards on uniform background | shadow-md | card (8% black, 8pt radius) | tonalElevation(2) |
modal | Sheets, popovers, dropdowns | shadow-xl | modal (16% black, 20pt radius) | tonalElevation(5) |
Anti-patterns:
- Drop shadows on list cards that are already separated by background color — double visual separation
.shadow(color: .black.opacity(0.15), radius: 12)— too heavy, makes UI feel oldshadow-2xlor higher on content cards — reserved for modals only
Live specimens
none
border border-lineFlat card on a differentiated background
subtle
shadow-smSubtle lift on interactive inputs
card
shadow-mdCard on a uniform background
modal
shadow-xlSheets, popovers, dropdowns