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 plate
Reach for this when
- Starting a design system.
- Auditing a product for inconsistent spacing.
- Building density variants.
- A layout looks unsettled and the elements are individually correct.
Common mistakes
- Too many steps, which reintroduces the decision.
- Inner space equal to or larger than outer space.
- Physical properties that break under right-to-left layouts.
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.
Keeping a spacing system intact
Do
- Derive every gap from the scale, including the awkward ones.
- Name steps by size rather than by use, so one step can serve several purposes.
- Use fewer, larger steps at the top of the scale, where precision stops mattering.
- Apply space with a single direction convention, so margins do not fight.
Do not
- Add a one-off value to fix a single component.
- Use every step. A scale with twelve steps and six in use is a scale with six steps.
- Set spacing per component, which guarantees drift within a quarter.
In practice
- i.
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.
- ii.
Messy layout, spacing diagnosis
The usual root causeMost layouts that read as untidy are not misaligned, they are spaced with values that have no relationship to each other. Replacing eleven arbitrary gaps with four scale steps fixes the impression without moving anything else.
Local chart
FND·042 · Region II · Grid C1
This entry and the entries it is stated to connect with. Each line is labelled with what the connection means.
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.
- Aesthetic-Usability EffectLAW·011 · Law
- Fitts's LawLAW·002 · Law
- Law of PrägnanzLAW·017 · Law
Often used with
These usually appear in the same screen or the same decision.
- GridsFND·039 · UI foundation
A grid without a spacing scale produces alignment with no rhythm.
Practical example
A worked decision where this was the deciding factor.
- Choosing a Density for an Analytics DashboardCASE·004 · Case study
Short definition
The one-paragraph version, for when that is all you need.
- Design TokenTERM·071 · Term
- GutterTERM·069 · Term
- Internationalization (i18n)TERM·135 · Term
- Right-to-Left (RTL)TERM·137 · Term
- WhitespaceTERM·055 · Term
Related concept
Connected closely enough to change how you apply this.
- Target SizeA11Y·011 · Accessibility
- Design TokensSYS·001 · Design system
- AlignmentFND·003 · UI foundation
- Borders and DividersFND·047 · UI foundation
- DensityFND·016 · UI foundation
- ProportionFND·013 · UI foundation
- ProximityFND·004 · UI foundation
- RepetitionFND·010 · UI foundation
- RhythmFND·017 · UI foundation
- ScaleFND·012 · UI foundation
- Visual HierarchyFND·001 · UI foundation
- WhitespaceFND·015 · UI foundation
- InternationalizationWRT·006 · UX writing