Skip to main content

Search rules

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

designVercel

Nested Radii

SHOULD

SHOULD: Nested radii: child ≤ parent; concentric

Child radius ≤ parent radius and concentric

Bad

Good

Why it matters

When a rounded element contains another rounded element, the inner radius should be the outer radius minus the padding. This keeps the curves concentric and visually aligned. Formula: innerRadius = outerRadius - padding. The formula has a bound, which the Vercel line does not state: better-ui's surfaces guide notes that "This rule is most useful when nested surfaces are close together.

If padding is larger than `24px`, treat the layers as separate surfaces and choose each radius independently instead of forcing strict concentric math." Past roughly 24px of padding the eye no longer reads the two curves as one nested form, so the arithmetic starts producing an absurdly large outer radius in service of a relationship nobody perceives.

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.