Skip to main content
⌘K

Search

Search pages, pieces and blocks.

Size

Four control heights. 28 is the default, and everything in one row shares it. Every other fixed size has a name, so a density mode can change it in one place.

Default
28, h-7
Heights
20, 24, 28, 32
Named
24 tokens

In a real piece

Measured from the page. Hover a height to see what shares it.

Button, four heights

One row of controls shares 28

Rows and marks

Booking
Edit
Duplicate

Control heights

Buttons, inputs and tabs come in these four. Uses count the h class in src.

HeightClassStepJobUses
20h-5xsInline actions inside a row or a chip16
24h-6smToolbars, table headers, dense panels22
28h-7defaultButtons, inputs, selects, tabs, nav items. Start here.61
32h-8lgThe one main action on a sparse page16
36, 40h-9, h-10noneNot a control height. Used by table heads, a sparkline and two drawings, and by two controls that break the rule: Navigation Menu's trigger and Inline Edit's title.4, 3

Named sizes

Read with the variable form, h-(--size-row). Click to copy.

TokenValueJobUses
Pieces
28A row in a menu, select, combobox or list27
26A menu's group label1
22Header tabs, view switch, Slider value tag5
22Long side of the Slider thumb5
7Slider major tick, Stepper mark4
75Stepper, one mark to the next2
22Tooltip beak width7
1.75How far the beak tucks under7
5Tooltip padding on one line2
7Tooltip padding, stacked2
1.5Keyboard outline width18
Page and stages
1280Page content width6
1328Page width plus px-6 gutters2
262Library side nav0
360App Shell aside2
150Library tile1
190Library tile, large1
640Specimen stage width0
560Block stage height1
208Stage offset1
480Stage minimum0
360Code panel width0
560Code block height1
83Kept, since tokens are never removed0

Hit targets

Small marks get a bigger invisible area, so they are easy to hit without looking bigger.

Checkbox  

after:-inset-x-3 after:-inset-y-2

Switch  

The same invisible after: area. Radio does it too.

Icon button  

Above the 24 minimum of WCAG 2.2. Below 44, so on touch keep 8 between targets.

Density

Move to
Lisbon
Porto
Faro
--size-row: 28pxAs shipped. Rows share the 28 of the controls, so a row and a button line up.
Move to
Lisbon
Porto
Faro
--size-row: 26pxA compact density is one token away: every menu, select and combobox row follows.

Do and don't

Controls that sit in one row are one height.

DoInput, select and button at 28. Their text and edges line up across the row.
Don't32, 24 and 36 side by side. The baselines drift, and 36 is not a control height.

Rules

  1. 1Start at 28. Go to 24 or 20 only inside dense panels, and to 32 only for the one main action.
  2. 2Everything in one row is one height.
  3. 3A fixed size that is not a control height gets a --size token with its job, never a number in a class.
  4. 4Small marks keep their after: hit area. Do not remove it to fix a layout.