Radius
One token sets every corner. Small controls go round, containers stay tight, and nested corners follow their container.
Small things go round
Anything you press or toggle on its own is a pill: buttons, badges, chips, and switches. Anything that holds content keeps a tight 8px corner, so a field, a card, and a menu all feel like one family.
Nested corners
When a surface sits inside a padded container, its radius is the outer radius minus the padding. The Tabs track is 8px with 4px of padding, so its selected segment is 5px and the two curves stay parallel.
Do
A 5px segment inside the 8px track: the curves run side by side.
Don’t
A square segment inside a round track leaves the corners pulling against each other.
Where each corner goes
Build it
Change one token to make the whole system tighter or softer. The other steps scale with it.
1234:root { /* rounded-lg; rounded-sm, -xl, and -2xl scale from it. */ --radius: 0.5rem;}For a nested surface, subtract the padding from the outer radius:
1234{/* Inner radius ≈ outer radius minus the padding between them. */}<div className="rounded-lg bg-popover p-1 shadow-(--shadow-overlay)"> <div className="rounded-sm bg-control-hover px-2 py-1.5">Highlighted row</div></div>