Radius

Matrix is rounded but precise. Eight steps from a 2px corner to a full pill, chosen by the size of the element. Controls are 8px at every size; surfaces that hold them are 12px.

Usage

/* Radius is one property: border-radius, from a token. */
.panel {
  border-radius: var(--rounded-lg);
}
// The same steps as Tailwind utilities
<div className="rounded-lg border border-border bg-card" />

shadcn components read --radius, which points at --rounded-md (8px), the control radius, so they pick up the Matrix default automatically.

Radius scale

TokenExampleValueUse
2pxTiny marks under 16px: status dots in a row, mini swatches, progress segments.
4pxCheckboxes, inline code, keyboard keys, small counters.
6pxSmall tags and badges around 24px tall.
8pxEvery control, at any size: buttons, inputs, selects, menu items, swatches. Also tooltips.
12pxSurfaces that hold controls: menus, popovers, small cards.
16pxBrand cards and panels.
24pxDialogs, sheets and large feature surfaces.Provisional
9999pxPills: avatars, switches, chips.

Click a token or class to copy it.

Radius follows size

Element heightExampleRadiusFor
Under 16px
Status dot, mini swatch
~20px
Checkbox, counter, tag
~36px
Controls at any size: button, input, select, menu item
~64px
Menu, popover, small card
~96px
Card, panel

A corner has to fit the element it rounds. The same 8px that looks right on a 36px button turns a 14px chip into a pill, and a 4px corner looks sharp on a large card. Before you pick a radius, check the height of the container and use the step next to it in the table. Between two rows, pick the smaller radius.

Nested corners

Inbox
Agents
Settings
Inner 8px: outer 16px − 8px padding
Inbox
Agents
Settings
Inner 16px: same as the outer corner

When a rounded surface sits inside another, the inner corner is the outer corner minus the gap between them. A 16px card with 8px padding holds 8px items. Matching radii make the inner corners look too round.

Guidelines

  • Use a token, never a hand-written border-radius or an arbitrary rounded-[10px].
  • Always consider the size of the container before picking a radius: small elements get small corners, large surfaces get larger ones.
  • Controls (buttons, inputs, selects) are md (8px) at every size, so a row of them reads as one family. Their containers step up: lg for menus and popovers, xl for cards.
  • Nest corners: inner radius = outer radius − padding.
  • Use full only for pills and circles, never for rectangular buttons or cards.
  • Don't mix radii on one surface (a rounded top with square bottom corners), except where it's attached to an edge.
  • Don't round data tables or full-width bars; square edges read as structure.