Skip to content

Radius

The radius ladder on the shapes it is for, each step with its value, its tokens and its classes.

Corners come from one ladder. A step belongs to a kind of thing, not to a size someone liked: small marks, rows, controls, cards, trays. Every shape below is the Registry component as it installs, so the corner on the page is the corner a product gets.

The ladder

DraftPaidEsc
6pxSmall marks: badges, keycaps and checkboxes, and the hover fill of a small ghost icon button.rounded-smallrounded-chiprounded-sm
Website refresh
8pxRows and ghost targets: a list row, a menu row, a toggle.0.5remrounded-mdrounded-lgrounded-nav
10pxControls: buttons, fields and the track of a segmented control.rounded-control
8pxA segment or a tab inside a control's track, one step in from the control.rounded-control-inner
Website refresh
Due on 12 December
Fourteen of twenty tasks are done.
12pxCards, menus and popovers.rounded-xlrounded-2xlrounded-card

Archive this project?

Its tasks stay where they are.

16pxTrays and dialogs.rounded-3xlrounded-tray
KS
PillChips, switches and avatars, and nothing else. The item has no token for it: the class is Tailwind's own.rounded-full

Nesting

A corner inside a corner turns about the same centre, so the outer radius is the inner radius plus the gap between them. A menu shows it: its rows sit one step of padding in from its edge.

12px is the row's8px plus the menu's inset of 4pxThe corner is drawn 8 times its size. The inset is the menu's padding, p-1, one step of the spacing scale.

Classes

Tailwind's own radius names are mapped onto the ladder, so rounded-md in a component that was not written for Khaeli still lands on a step.

ClassValueReads
6px
calc(var(--radius) - 2px)
8px
var(--radius)
8px
var(--radius)
12px
var(--radius-card)
12px
var(--radius-card)
16px
var(--radius-tray)
20px
calc(var(--radius-tray) + 4px)
6px
var(--radius-small)
10px
var(--radius-control)
8px
var(--radius-control-inner)
8px
var(--radius-nav)
6px
var(--radius-chip)
12px
var(--radius-card)
16px
var(--radius-tray)