Ripple Design System

Spacing

In components and layout, a defined set of spacing units provides good alignment and consistent spacing relationships.

We use a spacing system in a 4-pixel grid.

It helps to create a visual hierarchy and organises page content.

The 4px framework creates consistent spacing relationships and alignment across breakpoints. This is crucial for good UI design.

SizeCSS Variable
4pxrpl-sp-1
8pxrpl-sp-2
12pxrpl-sp-3
16pxrpl-sp-4
20pxrpl-sp-5
24pxrpl-sp-6
28pxrpl-sp-7
32pxrpl-sp-8
40pxrpl-sp-9
48pxrpl-sp-10
56pxrpl-sp-11
64pxrpl-sp-12
80pxrpl-sp-13
120pxrpl-sp-14

Spacing should be proportional to the size and importance of the elements on the page. For example, larger elements may need more space to balance their visual weight.

Consider spacing in responsive design to ensure that the spacing remains consistent and proportionate on different screen sizes and devices.

For page level, component and content spacing see layout.


Propose a change to this page on GitHub.