Spacing

A spacing system to simplify the creation of UI elements and page layouts.

Using a spacing system

Just like with colours, working from a defined spacing system allows you to work faster and more consistently. Consistent and scalable spacing helps you eliminate guesswork, because you're designing with a limited set of options.


It also provides the foundation for harmoniously and consistently positioning elements onscreen, creating a familiar rhythm and order to your designs.

 

Avoid chaotic designs

Working within a specific spacing system may sound like a creative constraint, but it can in fact help remove decision fatigue and allows you to work more efficiently and design better. Without a defined system, it is very easy to end up with messy and inconsistent designs.


A significant side effect of designing this with inconsistent spacing values is, that the front-end developers will have to do much more custom work or simply that the devs choose the values they have available and the end-result will look different from the design file.

 

Best practices

  • Aim to use multiples of 8px when defining measurements, spacing, and positioning elements.
  • When necessary use 4px to make more fine-tuned adjustments.
  • Whenever possible, make sure that objects line up, both vertically and horizontally.

 

Spacing values

Spacing / space
0px
0px
0
2px
2px
1
4px
4px
2
6px
6px
3
8px
8px
4
12px
12px
5
16px
16px
6
20px
20px
7
24px
24px
8
32px
32px
9
40px
40px
10
48px
48px
11
56px
56px
12
64px
64px
13
72px
72px
14
80px
80px
15
88px
88px
16
96px
96px
17
104px
104px
18
112px
112px
19
120px
120px
20
128px
128px
21
160px
160px
22
200px
200px
23