Skip to main content
⌘K

Search

Search pages, pieces and blocks.

Corners

Three radii do the work: 4 for marks, 6 for controls and rows, 12 for anything that holds them. When one sits close inside another, the outer corner is the inner corner plus the padding.

Working
4, 6, 12
Tokens
10 plus full
Nesting
outer = inner + pad

In a real piece

A menu, a field row and a card, as shipped. The tags are read from the computed corner. Hover one.

View
Show weekendsW
Show cancelledC
Go to todayT
⌘K
PaidTA
Beginner lesson, Ericeira
Sat 5 Dec, 9:00, €45.00

Every radius in the code

From globals.css. Uses count rounded classes in src/components and src/app. Click a token to copy.

CornerTokenpxWhereNoteUses
2Chart bars, input group addons, link focus9
4Marks: Checkbox, Kbd, Switch knob, tooltip24
5Slider and Image Compare thumbs5
6Rows, menu items, tabs, chips, sidebar items116
6Button, Input, Button Group, Toggle GroupReads --radius, the same as md105
6The site shell's panelReads --radius1
12Card, Dialog, menus, Command, Lightbox69
16Library miniatures onlyNot in components/ui1
20NothingUnused0
24NothingUnused0
infiniteAvatar, Radio, Slider track, dots49

Nesting

The rule only bites when the gap is small, as in menus, segmented controls and grouped buttons.

6 outside, 4 inside, 2 between. Menubar, rounded-lg p-0.5 around rounded-sm triggers. 6 = 4 + 2.

Show weekends

12 = 6 + 6. Menu, rounded-xl p-1.5, around a rounded-md row. The two curves run parallel.

Show weekends

12 inside 12. The inner curve is too round for the gap, so the corner pinches.

Past 8, it stops mattering. A card's p-5 is wide enough that a 6 field inside it reads on its own.

Do and don't

Rename
Duplicate
Delete
DoA 12 menu with 6 padding and 6 rows. Hover and selection marks fit the menu's curve.
Rename
Duplicate
Delete
Don'tA 4 menu with pill rows. The inside is rounder than the outside, and full is for avatars and dots.

In the code

  1. a--radius-md, --radius-lg and --radius-panel all read --radius. Button and Input (rounded-lg) and rows (rounded-md) are still one corner under two names.
  2. b--radius: 0.375rem is the one source. Change it and md, lg, panel, xl and 4xl follow.
  3. cSmall controls clamp with rounded-[min(var(--radius-md),10px)] and 12px, 10 places: Button xs and sm, Toggle, Toggle Group, Select, Native Select and the header tabs. Both resolve to 6, so the clamp does nothing today.
  4. d--radius-3xl and --radius-4xl have no uses. 2xl appears only in the Library miniatures.

Rules

  1. 1Pick by job: 4 for a mark, 6 for a control or a row, 12 for a container.
  2. 2Close nesting adds up: outer equals inner plus padding. A 6 padded menu around 6 rows is 12.
  3. 3Full is for things that are round by nature: avatars, radios, dots, tracks. Never a button.
  4. 4Do not add a radius. If 4, 6 and 12 do not fit, the piece is in the wrong family.