Skip to content

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.

rounded-sm3px
rounded-md6px
rounded-lg8px
rounded-xl12px
rounded-4xl6px
rounded-fullround

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.

UtilityFormulaValueUsed by
rounded-sm--radius × 0.3753pxMenu items, and half of a control: the arrow tile inside a button.
rounded-md--radius × 0.756pxButtons, inputs, selects, tabs, menus and popovers (the brand's radius-control).
rounded-lg--radius8pxAlerts, tab lists, hover cards, code blocks.
rounded-xl--radius × 1.512pxCards, dialogs, command palettes (the brand's radius-card).
rounded-2xl, rounded-3xl--radius × 1.512pxCapped at the card radius.
rounded-4xl--radius × 0.756pxThe badge. A badge is a chip, not a pill.
rounded-fullnot a tokenroundAvatars, 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.

Card, 12px
Cards, dialogs and command palettes.
Badge, 6px

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-md for them and rounded-md has 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.

Inner corners are smaller than the outer ones.
Do

Nest a smaller radius inside a larger one so the corners stay concentric.

Draft
Don’t

Don’t round a button or a badge into a pill.

Use the scale and never an arbitrary pixel radius such as rounded-[10px]. Photographs and video that run to the edge of the screen keep square corners; inside the grid they take rounded-xl.