A row of controls that line up looks calm and is quick to use. Choosing heights from a short list makes that automatic.
Every control comes in three heights: 24, 32 and 40 px. Controls in one row share one height.
Control heights
Controls are the things people click or type in: buttons, text fields, selects, segmented controls and tabs. A fixed height keeps a row of them lined up, whatever their text.
| Size | Height | Where |
|---|---|---|
| Small | 24 px | Dense tables and their toolbars, filters, tags |
| Default | 32 px | Forms, buttons, the header, toolbars, everything else |
| Large | 40 px | Sign-in and onboarding pages. Optional for the main action on touch screens |
- Keep controls of one height in one row. A 24 px button next to a 32 px field looks misaligned.
- Set heights with the size tokens, not with padding. The text sits in the middle of the height.
Parts with a fixed size of their own, such as the switch (20 × 36 px, knob 16 px) and the avatar (32 px; 24 px in dense tables and lists), keep it in their component tokens: switch.size.* and avatar.size.*.
Target size
Every control can be clicked in an area of at least 24 × 24 px, and tapped in 44 × 44 px on touch screens.
- 24 px is the minimum target size of WCAG 2.2 (SC 2.5.8). Every control height meets it.
- On touch screens (phones and tablets), every control responds to a tap in at least 44 × 44 px (
size.target.touch). Mouse and keyboard screens keep the 24 px minimum. - A control that stands alone, such as an icon button, keeps its visible size and gets an invisible tap area around it. Leave at least 12 px between two 32 px controls so their tap areas do not overlap.
- Rows in lists and menus, such as navigation items, menu items and tabs, sit next to each other, so an invisible area would cover the next row. Make the rows themselves 44 px high on touch screens.
Density
Beehexa has one density: default.
One density means every screen is designed and checked at one size, and people see the same layout in every product. For a dense table, use small (24 px) controls and rows, not smaller spacing tokens. Screens built on the tokens will follow any future density without changes.
Do and don’t
Give the controls in one row the same height.
Don’t mix heights in one row. Edges and text no longer line up.
Give a small icon button an area of at least 24 × 24 px that responds to a click.
Don’t make the clickable area the size of the icon. It is hard to hit.
Tokens
| Token | Value | Description |
|---|---|---|
--bh-size-control-small | 1.5rem | 24 px. Height of small controls: dense tables and their toolbars, filters, tags. Side padding space.100. |
--bh-size-control-default | 2rem | 32 px. Height of buttons, text fields, selects, segmented controls and tabs everywhere else: forms, the header, toolbars. Side padding space.150. |
--bh-size-control-large | 2.5rem | 40 px. Height of controls on sign-in and onboarding pages. Optional for the main action on touch screens. |
--bh-size-target-minimum | 1.5rem | 24 px. Smallest area that responds to a click or tap (WCAG 2.2 SC 2.5.8). Every control and icon button is at least this size. |
--bh-size-target-touch | 2.75rem | 44 px. Area that responds to a tap on touch screens. Extend the hit area around a smaller control and keep its visible size; rows in lists and menus grow to this height instead. |
--bh-size-icon-default | 1rem | 16 px. Default icon size: buttons, menus, tables, form fields, next to 14 px text. |
--bh-size-icon-medium | 1.25rem | 20 px. Icons next to 16 px text, in toolbars and in the page header. |
--bh-size-icon-large | 1.5rem | 24 px. An icon on its own, such as a status in a card or a small empty state. |
--bh-size-icon-empty | 2rem | 32 px. Empty states only. |
--bh-size-tooltip-max-width | 15rem | 240 px. Widest a tooltip grows before its text wraps. Atlassian and Fluent use 240 px, Ant and Primer 250 px; the range across 7 systems is 200 to 300 px. |
--bh-size-track-default | {space.050}0.25rem | 4 px. Thickness of a thin track or grab bar: progress, slider track, drawer handle. Pair with radius.full. |
--bh-size-overlay-min-width | 8rem | 128 px. Narrowest a menu or a select, combobox or command list gets; it grows to its trigger or its widest item. |
--bh-size-overlay-width | 18rem | 288 px. Width of a popover or hover card that holds content. |
--bh-size-overlay-max-height | 18rem | 288 px. Tallest a combobox or command list grows before it scrolls: about eight 32 px items. |
--bh-size-dialog-default | 32rem | 512 px. Widest a dialog grows, on screens wider than that plus the page margins. |
--bh-size-dialog-small | 24rem | 384 px. Widest an alert dialog or a side drawer of a few controls grows. |
--bh-size-dialog-xsmall | 20rem | 320 px. A small alert dialog (one short question), and the narrowest phone width an alert dialog keeps. |
Related
- Spacing: the space inside and between controls.
- Typography: the text style each control uses.
- Accessibility: the Beehexa rule for touch targets.