Skip to content

Flex-box

The spacing system helps maintain a vertical and horizontal rhythms in the interface. It makes the interface easier to use by reducing cognitive load. For example, if there are different indents in the interface everywhere, the brain will try to understand this logic and thereby increase its cognitive load.

In addition, vertical and horizontal rhythms help maintain visual hierarchy on the page, structure components and blocks according their importance to the user.

TIP

Use 4 as the multiple of all indents. It's the main denominator of our design system (scaleIndent property in API, --scale-indent in design tokens).

Here is a table with spacing tokens we use in our design system.

Token nameValue in pxValue in remValue as a multiple of 4
--spacing-05x20.1250,5
--spacing-1x40.251
--spacing-2x80.52
--spacing-3x120.753
--spacing-4x1614
--spacing-5x201.255
--spacing-6x241.56
--spacing-8x3228
--spacing-10x402.510
--spacing-14x563.514
--spacing-20x80520
--spacing-24x96624
--spacing-30x1207.530

Released under the MIT License.

Released under the MIT License.