Skip to main content
On this page

Spacing

Padding, margins and white-space between elements.

Overview​

Spacing is commonly referred to as white space. It is the space between elements and defines the value for common properties such as padding and margin.

Scale​

Nebula spacing is based on a 4px scale. This means each token is a multiple of 4. A pixel value can easily be converted to its token form by dividing by 4. For example, a 32px space is space.8.

Additionally we also include some "semantic" values for specific cases - between form fields for example.

Theme tokens
TokenDefault Value
space.10.4rem
space.20.8rem
space.31.2rem
space.41.6rem
space.52rem
space.62.4rem
space.72.8rem
space.83.2rem
space.93.6rem
space.104.0rem
space.114.4rem
space.124.8rem
space.betweenCards2.4rem
space.betweenComponents2.4rem
space.betweenFormFields1.6rem
space.betweenButtons0.8rem
space.betweenChips0.8rem
space.betweenParagraphs0.8rem
space.cardPadding1.6rem
space.popoverPadding1.2rem