Chapter 02 Foundations
Shadow
One shadow for everything that floats, and a backdrop behind what blocks the page.
Shadow
Only what floats has a shadow: lists, menus, popovers, dialogs, toasts. Cards stay flat.
| Token | Value | Tailwind | For | Sample |
|---|---|---|---|---|
--ui-shadow | 0 8px 24px var(--ui-shadow-color) | shadow-ui | Every floating layer, with a transparent border so high contrast keeps its edge. | |
--ui-shadow-color | ink 18%, slate 40% on dark | — | A dark shadow is lost on a dark page, so dark mode casts a light slate glow. | |
--ui-backdrop | rgb(11 16 32 / 0.6) | bg-backdrop | Behind a dialog, drawer or bottom sheet. |
Try the shadow
Offset and blur grow together; the colour stays the token.
A floating layer
Every menu, popover, dialog and toast reads --ui-shadow, so one override moves them all.
Floating
A menu, popover or dialog.
:root {
--ui-shadow: 0 8px 24px var(--ui-shadow-color);
}