Radius
One variable sets the corner scale. Controls are 6px, cards are 12px, and nothing is a pill.
Corners are tight. A control has a 6px corner, a card has a 12px corner, and a picture that runs to the edge of the screen has none. The whole scale derives from one variable, --radius, so a client brand can square or soften every component by changing one number.
The scale
--radius is 0.5rem (8px). Each Tailwind step is a fraction of it, chosen so that the steps upstream components already use land on the brand.
| Utility | Formula | Value | Used by |
|---|---|---|---|
rounded-sm | --radius × 0.375 | 3px | Menu items, and half of a control: the arrow tile inside a button. |
rounded-md | --radius × 0.75 | 6px | Buttons, inputs, selects, tabs, menus and popovers (the brand's radius-control). |
rounded-lg | --radius | 8px | Alerts, tab lists, hover cards, code blocks. |
rounded-xl | --radius × 1.5 | 12px | Cards, dialogs, command palettes (the brand's radius-card). |
rounded-2xl, rounded-3xl | --radius × 1.5 | 12px | Capped at the card radius. |
rounded-4xl | --radius × 0.75 | 6px | The badge. A badge is a chip, not a pill. |
rounded-full | not a token | round | Avatars, switches, radios and slider thumbs. |
The base is 8px rather than the brand's 6px so that upstream's rounded-[calc(var(--radius)-5px)] in the input group stays at 3px instead of 1px.
Where the theme differs from the brand source
- Menus, selects and popovers are 6px. The brand gives floating panels the card radius, 12px, but upstream uses
rounded-mdfor them androunded-mdhas to stay 6px for controls. - Squircle corners (
corner-shape: squircle, which steps the two radii to 8px and 16px where the browser draws them) are not applied. The property would also deform circular elements. This is a recorded decision.
Rules
A shape nested in another takes a smaller radius, so the corners stay concentric: inner equals outer minus the inset, never below 2px. A card (12px) holding a row panel (8px) holding a button (6px) follows this without any extra class, because the scale steps down.
Nest a smaller radius inside a larger one so the corners stay concentric.
Don’t round a button or a badge into a pill.