Skip to content

Spacing

A 4px scale, with half steps at the small end.

Scale

Each step is a Tailwind spacing class: space-2 is gap-2, px-2 or p-2.

space-0.5
2px

The tightest gap, between parts of one item.

space-1
4px

A tray's padding around its surface, a menu's around its rows, and the gap between items that belong together.

space-1.5
6px

Icon to label inside a control.

space-2
8px

The default gap between items. A row's inline padding.

space-2.5
10px

A small button's inline padding.

space-3
12px

Between groups. A button's inline padding; a text field's.

space-4
16px

Inside a surface: card content, a toast, an accordion row.

space-5
20px

Inside a dialog.