⌘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.
| Height | Class | Step | Job | Uses |
|---|---|---|---|---|
| 20 | h-5 | xs | Inline actions inside a row or a chip | 16 |
| 24 | h-6 | sm | Toolbars, table headers, dense panels | 22 |
| 28 | h-7 | default | Buttons, inputs, selects, tabs, nav items. Start here. | 61 |
| 32 | h-8 | lg | The one main action on a sparse page | 16 |
| 36, 40 | h-9, h-10 | none | Not 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.
| Token | Value | Job | Uses |
|---|---|---|---|
| Pieces | |||
| 28 | A row in a menu, select, combobox or list | 27 | |
| 26 | A menu's group label | 1 | |
| 22 | Header tabs, view switch, Slider value tag | 5 | |
| 22 | Long side of the Slider thumb | 5 | |
| 7 | Slider major tick, Stepper mark | 4 | |
| 75 | Stepper, one mark to the next | 2 | |
| 22 | Tooltip beak width | 7 | |
| 1.75 | How far the beak tucks under | 7 | |
| 5 | Tooltip padding on one line | 2 | |
| 7 | Tooltip padding, stacked | 2 | |
| 1.5 | Keyboard outline width | 18 | |
| Page and stages | |||
| 1280 | Page content width | 6 | |
| 1328 | Page width plus px-6 gutters | 2 | |
| 262 | Library side nav | 0 | |
| 360 | App Shell aside | 2 | |
| 150 | Library tile | 1 | |
| 190 | Library tile, large | 1 | |
| 640 | Specimen stage width | 0 | |
| 560 | Block stage height | 1 | |
| 208 | Stage offset | 1 | |
| 480 | Stage minimum | 0 | |
| 360 | Code panel width | 0 | |
| 560 | Code block height | 1 | |
| 83 | Kept, since tokens are never removed | 0 | |
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-2Switch
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.
Rules
- 1Start at 28. Go to 24 or 20 only inside dense panels, and to 32 only for the one main action.
- 2Everything in one row is one height.
- 3A fixed size that is not a control height gets a --size token with its job, never a number in a class.
- 4Small marks keep their after: hit area. Do not remove it to fix a layout.