Skip to main content

Search rules

Search all UI Guides rules by name, category, or source

designRAMS

Inconsistent Shadow Usage

SHOULD

SHOULD: Use consistent elevation/shadow tokens to convey hierarchy. Ensure shadows have sufficient contrast in both light and dark themes. Avoid mixing shadow styles.

Apply shadows consistently to establish visual hierarchy

Bad

Good

Why it matters

Same upstream bullet as design-rams-border-radius — one line under "Components" — read here for its shadow half; the explanation is ours. A shadow is a claim about where an element sits in space, and the room only holds together if every claim assumes the same light source. Hand-rolled shadows with different blur, offset, and direction put three cards under three different suns, and the eye reads that as noise rather than depth.

Assign elevation by role — resting cards one step, dropdowns and popovers a step above, modals the top — and take the values from one ramp (see design-ibelick-default-shadows for the Tailwind scale, and design-layered-shadows for building a two-layer shadow when you do need a custom one).

Built by Gleb Stroganov, design engineer at Evil Martians.

The rules come from other people's skills and guidelines — Vercel, Rauno Freiberg, @Ibelick, impeccable, Emil Kowalski, Tailwind, RAMS — each one credited on the Sources page. The work here is extraction and wiring: every rule is pulled into one corpus, given a good and a bad example you can operate, a MUST/SHOULD/NEVER rule an agent can paste, and a link back to where it came from.