Tokens
Sizes
Spacing, radii, controls, rows and the header.
Spacing
Spacing is the 4px grid.
| Token | Value | |
|---|---|---|
--space-1 | 4px | |
--space-2 | 8px | |
--space-3 | 12px | |
--space-4 | 16px | |
--space-5 | 20px | |
--space-6 | 24px | |
--space-8 | 32px | |
--space-10 | 40px |
The library also uses three values on purpose.
| Value | Use |
|---|---|
| 6px | The selection inset, the inner padding of a row, the gap in a MetaLine, the radius of controls |
| 10px | The gap between an icon and its label in navigation and menus |
| 14px | The larger widget and panel insets |
Any other spacing is a mistake.
Radius
| Token | Value | |
|---|---|---|
--radius-xs | 4px | |
--radius-sm | 6px | |
--radius-md | 8px | |
--radius-lg | 10px | |
--radius-xl | 14px | |
--radius-2xl | 20px | |
--radius-full | 999px |
| Token | Use |
|---|---|
--radius-xs | kbd, inline code, marks |
--radius-sm | Buttons and fields at every size |
--radius-md | Cards, frames, code blocks |
--radius-lg | Menus, popovers and board lanes |
--radius-xl | The composer |
--radius-2xl | Widgets and the cards on a WidgetGrid |
Controls
| Token | Value | |
|---|---|---|
--control-sm | 24px | |
--control-md | 28px | |
--control-lg | 32px |
sm is for dense rows, list rows, table bars and toolbars.
md is for forms, panels and dialogs.
lg is for empty states.
Fields are 30px, the height of a compact row.
Rows and headers
| Token | Value | |
|---|---|---|
--row-compact | 30px | |
--row-default | 36px | |
--header | 38px |
Lists and tables are compact by default, 30px, and comfortable at 36px. The header of a view or a panel is 38px. On a phone, rows are 44px and 58px, see Phones.
Open the example ↗
Edit on GitHub
Last updated on