Foundations
Elevation
Flat surfaces held apart by hairlines and fills, and one soft shadow for anything that floats.
Elevation follows Flat. Cards and every other in-flow surface stay flat: shadow-card is no shadow at all, and separation comes from a hairline and a fill. Only layers that float above the page, such as popovers, menus, select content, dialogs, toasts and tooltips, get shadow-popover.
A flat card
bg-card border border-border shadow-card
A floating popover
bg-popover shadow-popover
A flat card
bg-card border border-border shadow-card
A floating popover
bg-popover shadow-popover
The popover shadow is the foreground color at 18%, so it reads as a dark shadow in light and a faint glow in dark. Because it references a themed color, it is declared in both theme blocks and recomputes inside each island.
Tokens
| Token | Tailwind | Value | About |
|---|---|---|---|
| card --sb-elevation-card | shadow-card | 0px 0px 0px 0px #0000 | Every in-flow surface is flat: a zero, transparent shadow (not none, so it stays valid inside Tailwind's shadow list). Separation comes from hairlines and fills Derives from Flat |
| popover --sb-elevation-popover | shadow-popover | light 0px 1rem 2.5rem 0px #0a0a0a2edark 0px 1rem 2.5rem 0px #fafafa2e | Floating layers only: popover, menu, select content, dialog, toast, tooltip Derives from Flat |