Radius
One base radius sets every corner, and each surface takes a step on the scale derived from it.
The base is --radius: 0.75rem, 12px. A larger surface gets a larger radius, so a container and the controls inside it follow the same curve. Change the base once and every corner in the system moves with it.
Tokens
Radius scale
| Sample | Token | Value | Job |
|---|---|---|---|
| rounded-sm | radius × 0.6 (7.2px) | Small marks: the checkbox, a date picker segment, a text link’s focus ring, a skeleton line. | |
| rounded-md | radius × 0.8 (9.6px) | Controls: buttons, field boxes, tabs, the tooltip, a calendar day. | |
| rounded-lg | radius (12px) | Containers: cards, alerts, the date picker panel, a skeleton block. | |
| rounded-xl | radius × 1.4 (16.8px) | Floating surfaces that cover the page: dialogs and drawers. | |
| rounded-2xl | radius × 1.8 (21.6px) | Reserved for larger surfaces in an app. | |
| rounded-3xl | radius × 2.2 (26.4px) | Reserved for larger surfaces in an app. | |
| rounded-4xl | radius × 2.6 (31.2px) | Reserved for larger surfaces in an app. | |
| rounded-full | 9999px | Anything circular or pill-shaped: avatars, switches, radio dots, badges. |
Usage rules
- DoPick the step by the size of the surface: sm for marks, md for controls, lg for containers, xl for floating surfaces.The bigger the box, the bigger the curve it needs to look the same as its neighbours.
- DoRound the inside of a nested surface one step less than the outside.A control in a card then follows the card’s corner instead of fighting it.
- Don’tGive two surfaces of the same kind different corners.Two cards with different curves read as two different things, so the reader looks for a difference that is not there.
- DoMake a shape fully round only when it is meant to be round, such as an avatar or a switch.A circle says “person” or “toggle”. A fully rounded card says nothing and loses its edge.