Foundations
Shape
A radius ladder derived from one value, concentric nesting, and squircle corners where the browser supports them.
Shape decides how big a corner is and which curve draws it. It never carries meaning, so a rounder card is not a friendlier result.
Radius scale
Every rung is a fixed multiple of one root, --opsin-radius-base. Rungs are named for the object, not the size, and rounded-opsin-<rung> applies them.
| Rung | Use it for |
|---|---|
none | Full-bleed media and anything that meets a screen edge |
xs | Inline marks and small indicators, and the floor for a nested corner |
sm | Small controls and a well inside a card |
md | The default for a bounded surface: Card, a tile, a callout, a field, a list row |
lg | A card nearly the width of a phone screen, and a banner |
xl | Sheets and dialogs |
full | Capsules and circles: a Button, a chip, a segmented control, a status pill. Use rounded-full, because a capsule is a different object, not a bigger rung |
- Things a reader presses are capsules, and things a reader reads are squircles.
- Match the rung to the object. When two adjacent rungs both seem right, take the smaller.
- A different character is a change to the root in your theme, never to one component's radius.
- Never square a corner for emphasis, and never animate a radius.
Nesting
When one rounded box sits inside another, the inner radius is the outer radius minus the padding between them, and never less than xs.
inner = max(outer - gap, radius-xs)Only this keeps the two curves parallel. An equal inner radius pinches the gap on the diagonal, and a larger one bulges. Compute it from tokens, since a hard-coded 8px fits exactly one padding.
Squircle
Card, Dialog, Sheet, Callout, Field, Accordion, MetricTile, ResultCard and AlertBanner carry [corner-shape:var(--opsin-corner-shape)] beside their radius. The token holds superellipse(2), the same curve as the CSS keyword squircle, which eases curvature into the straight edge instead of pinching where an arc meets it. The argument is a power of two, so superellipse(4), which the token held until 2026-11, drew a nearly square corner. A browser without corner-shape drops the declaration and draws an ordinary rounded corner at the same radius, so no @supports guard is needed and nothing depends on it.
- Opt in on surfaces the system draws, never on images, embeds or video.
- Do not shrink the radius to compensate, or the nesting arithmetic differs between browsers.
- Do not fake it with a clip path or an SVG mask, which clip focus rings and shadows.
Accessibility
- Small controls do not take large rungs, because a radius takes tappable area from the 44pt floor in Space and layout.
- A parent with a smaller radius can clip a child's focus ring, so the ring is drawn outside the box with an offset.
- Assistive technology announces no corner, which is why shape may not carry information.
This site's chrome takes the same shapes at desk density, so its sheets, capsules and focus rings follow the rules on this page.
Tokens
| Token | What it controls | Used by |
|---|---|---|
| --opsin-radius-base1.25rem | The one radius the whole ladder is derived from. | accordion, callout, card, care-card, combobox, empty-state, field, menu, metric-tile, popover, questionnaire, radio-group, range-bar, reading-input, result-card, scale-input, scroll-area, select, skeleton, symptom-picker, tab-bar, textarea, timeline-entry, toast, tooltip, trend-sparkline |
| --opsin-radius-none0rem | Full-bleed media and anything that meets a screen edge. | no component |
| --opsin-radius-xs0.3125rem | The floor for a nested corner. Tags inside a chip, a swatch inside a legend. | popover, surface, symptom-picker, term, tooltip |
| --opsin-radius-sm0.625rem | Inputs, small controls and a well inside a card. | card, checkbox, combobox, consent-sheet, dialog, divider, log-sheet, menu, number-field, progress, reading-input, scroll-area, select, sheet, skeleton, slider, switch, tab-bar, tabs, toast, visually-hidden |
| --opsin-radius-md1.25rem | The default for a bounded surface: a card, a tile, a callout, a list row. | accordion, callout, card, combobox, empty-state, field, menu, metric-tile, popover, questionnaire, radio-group, result-card, scale-input, scroll-area, select, skeleton, symptom-picker, tab-bar, textarea, toast, tooltip |
| --opsin-radius-lg1.875rem | A card nearly the width of a phone screen, and a banner. | alert-banner, card, disclaimer-note, result-card, surface, toast |
| --opsin-radius-xl2.5rem | Sheets and dialogs. Applied to the leading edge only when the surface meets a screen edge on the other side. | alert-banner, dialog, sheet |
| --opsin-radius-inner-cardmax(calc(1.25rem - 5 * var(--spacing)), var(--opsin-radius-xs)) | A box inside a card at the comfortable density (card padding p-5). | no component |
| --opsin-radius-inner-card-compactmax(calc(1.25rem - 4 * var(--spacing)), var(--opsin-radius-xs)) | A box inside a card at the compact density (card padding p-4). | no component |
| --opsin-corner-shapesuperellipse(2) | The squircle curvature. Degrades to `round` where corner-shape is unsupported. | accordion, alert-banner, callout, card, dialog, field, metric-tile, result-card, sheet |
| --opsin-border-hairline1px | Every boundary in the system by default. | button, surface |
| --opsin-border-emphasis2px | The boundary of a surface carrying `attention` or `urgent`, where the boundary is one of the three non-colour carriers of the status. | disclaimer-note, field, surface |
| --opsin-border-focus2px | The focus ring. Always 2px with a 2px offset, always in a colour measured against both the surface and the page behind it, and never removed. See /docs/accessibility/keyboard-and-focus. | accordion, body-map, button, card, checkbox, combobox, consent-sheet, link, menu, number-field, popover, questionnaire, radio-group, scale-input, scroll-area, segmented-control, select, slider, switch, symptom-picker, tab-bar, table, tabs, term, textarea, toast, tooltip |
| --opsin-border-focus-offset2px | Offset for the focus boundary. | accordion, body-map, button, card, checkbox, combobox, consent-sheet, link, menu, number-field, popover, questionnaire, radio-group, scale-input, scroll-area, segmented-control, select, slider, switch, symptom-picker, tab-bar, table, tabs, term, textarea, toast, tooltip |