Foundations
Radius
How round corners are. A short list of values, each with a job. Components may only use the radii on this page.
Why we chose this
Corner radius is part of the personality. One value per kind of element makes the product look designed. The bigger the element, the larger its radius, and labels are fully round.
Use it for
- Buttons, fields and selects:
radius-md - Cards:
radius-lg. Banners, panels and dialogs:radius-xl - Tags, chips and badges:
radius-pill
Don't
- Type a one-off like
3px. - Use
radius-pillon a large container. - Round only some corners, unless the element is attached to an edge.
The scale
What components can use
These are the limits. A component's radius must come from the Component group. The Extended group is for large decorative surfaces only (image frames, hero panels), never for controls.
Component radii
radius-xs radius-sm radius-md radius-lg radius-xl radius-pill
Allowed on buttons, fields, cards, menus, dialogs, tags.
Extended radii
radius-2xl radius-3xl radius-4xl
Large surfaces only. For a pill, use radius-pill instead of radius-4xl.
The split between component and extended radii is my proposal from the token descriptions. Tell me if you want a different limit.
Radius by component
Read from components.css: which radius each component uses today.
Controls (buttons, fields, selects) use radius-md. Cards (project cards, nav cards) use radius-lg. Large surfaces (banners, panels, dialogs, hero cards) use radius-xl. Labels (tags, chips, badges) use radius-pill. Fine marks (progress, checkbox corners) use radius-xs and radius-sm.
Nested corners
When a rounded box sits inside another with padding, the inner radius should be the outer radius minus the padding. Then both curves stay concentric and the gap looks even.
Do · inner = outer − padding (16 − 8 = 8px)
Don't · same radius on both
If the result isn't on the scale, use the nearest smaller token. If the padding is larger than the outer radius, the inner element can use radius-xs or none.
Live examples
Rules
| Rule | Reason |
|---|---|
Use var(--radius-md), never border-radius: 7px. | One edit in tokens.json updates every component. |
| Same kind of element, same radius, everywhere. | Consistency is what makes the system read as one product. |
| Don't round only some corners unless the element is attached to an edge (for example a tab bar). | Mixed corners look like a mistake. |
Don't use radius-pill on large containers. | On a tall box it becomes an ellipse. Pills are for single-line elements. |
| The focus ring follows the element's radius. | A square ring on a round button looks broken. |
Buttons take radius-md.
.cm-btn { border-radius: var(--radius-md); }
.cm-card { border-radius: var(--radius-lg); }
.cm-tag { border-radius: var(--radius-pill); }A one-off 3px that isn't a token.
.cm-btn { border-radius: 7px; }
.cm-card { border-radius: 10px 10px 0 0; }
.big-panel { border-radius: var(--radius-pill); }