Spacing Systems
A fixed set of spacing values, so every gap in the product comes from the same vocabulary.
Definition
A spacing system defines the permitted values for margin, padding and gap, usually as multiples of a 4px or 8px base. It turns spacing from a per-instance judgement into a selection from a known set.
Craft convention. True because the industry converged on it. Breaking it costs familiarity, not correctness.
On this page
A working scale
| Token | Value | Typical use |
|---|---|---|
| space-1 | 4px | Icon to label, tightest possible relationship. |
| space-2 | 8px | Label to input, inside small components. |
| space-3 | 12px | Compact component padding. |
| space-4 | 16px | Default component padding, gap between related items. |
| space-6 | 24px | Between field groups, card padding. |
| space-8 | 32px | Between components. |
| space-12 | 48px | Between sections. |
| space-16 | 64px | Between major page regions. |
| space-24 | 96px | Marketing section separation. |
Rules that make a spacing system hold
- Space inside a group is always at least one step smaller than space around it. This is proximity, encoded.
- Skip steps for meaningful difference. Adjacent steps look like inconsistency rather than intent.
- Use logical properties, such as margin-block and padding-inline, so layouts mirror correctly for right-to-left languages.
- Prefer gap on a flex or grid parent over margins on children. It removes the last-child margin problem entirely.
- Do not create a separate scale for each component. One scale, consumed everywhere.
In practice
Spacing as the diagnosis for messy layouts
Design reviewMost layouts described as untidy contain a dozen distinct spacing values. Mapping them onto a five-value scale usually resolves the problem without changing anything else.
Continue from here
Each link says what the connection is, so you can tell a principle from an alternative from a thing people mix this up with.
Applies when you are designing
Principles behind this
The reasoning this solution is an application of.
Often used with
These usually appear in the same screen or the same decision.
- GridsUI foundation
A grid without a spacing scale produces alignment with no rhythm.
Practical example
A worked decision where this was the deciding factor.
Short definition
The one-paragraph version, for when that is all you need.
- Design TokenTerm
- GutterTerm
- Internationalization (i18n)Term
- Right-to-Left (RTL)Term
- WhitespaceTerm
Related concept
Connected closely enough to change how you apply this.
- Target SizeAccessibility
- Design TokensDesign system
- AlignmentUI foundation
- Borders and DividersUI foundation
- DensityUI foundation
- ProportionUI foundation
- ProximityUI foundation
- RepetitionUI foundation
- RhythmUI foundation
- ScaleUI foundation
- Visual HierarchyUI foundation
- WhitespaceUI foundation
- InternationalizationUX writing