Elevation shadows for cards, modals, and menus
A worked tutorial: assign shadow levels to cards, dropdowns, and modals with two-layer recipes that read as real depth.
Three levels cover every interface
Define resting (cards, tiles), raised (dropdowns, popovers, sticky bars), and overlay (modals, drawers, toasts) — and nothing else. Each level gets a two-layer recipe: a tight contact shadow plus a soft ambient. When a designer wants 'something between card and modal,' the answer is one of the three, because a fourth level is how elevation systems dissolve into per-component snowflakes.
Generate each layer with the sliders, then combine with commas. Resting stays whisper-quiet (single-digit opacities); overlays earn their drama with deeper contact shadows plus a backdrop dim — the dim does half the layering work before shadows even register.
Pair shadows with surfaces
Shadows alone cannot carry elevation on busy backgrounds — a card shadow over a photo or gradient disappears. Pair each level with a surface rule: resting cards get a solid fill slightly lifted from the page ground, overlays get fills plus the dim. Shadow plus surface plus (for overlays) dim is the full recipe; any one alone is fragile.
Borders deserve a vote too: a 1px border in a mid-tone at low opacity sharpens every level, especially resting cards whose shadows are too faint to define edges on their own.
Tokenise and police the levels
Save the three levels as shadow-sm, shadow-md, shadow-lg tokens and ban raw box-shadow values in component code — lint it if the stack allows. Elevation consistency is a system property; it cannot survive individual judgment calls in fifty files.
Revisit the levels once per theme change and once a year otherwise. Shadows are lighting, and lighting changes when backgrounds change — a level tuned for flat gray grounds needs re-tuning for textured or dark ones.
Tip
Stack all three levels on one test page during review. If resting and raised are indistinguishable, widen the gap before shipping — subtlety that nobody perceives is just absence.
Related free tools
Want to apply this right now? Open the color palette generator and try it with your own brand color — free, no sign-up.