Foundations
Spacing

Spacing


Spacing

Spacing make pages more readable by providing consistent spacing between elements. Different spaces are used for different purposes: from grouping elements that are related to each other to separating distinct sections of content, ensuring a clear visual hierarchy, and enhancing the overall flow of information.

Good spacing can significantly improve a reader's ability to comprehend and absorb the content, as it aids in reducing visual clutter and preventing confusion. It's a fundamental aspect of clean, user-friendly design, and plays a key role in making documents, websites, and other types of media more navigable and aesthetically pleasing.

Predefined spacing

NameValueUsage
hairline2pxUsed when you need to separate things with the minimum space possible.
xsmall4pxMainly to separate texts and inline content in general from each other.
small8pxSmallest possible margin in a container. You can also use it to separate a title from its subtitle from example.
normal16pxThe most used spacing value in the UI. Margin/padding often use this value.
large24pxSometimes normal space is not enough and makes the UI look too crowded. Use this token to separate content that needs more space.
xlarge32pxUsed to give some air to the UI, sometimes at the bottom of the screen or to separate big sections.
xxlarge48pxNot used so often but just here in case you need it.

Border radius

NameValueUsage
small2pxRarely used
regular4pxButtons, inputs, etc
circleMake it a circleWhen you need a circle shape