Soundstripe Design System

Spacing

Our spacing system is based on a modified base-8px grid. Spacing values are set in multiples of 8px, with exception of values below 24px, which are set in increments of 4px to allow for low smaller padding and margin for denser parts of the UI.

Usage

When building layouts and components, we can utilize a set of resusable spacing values that align to our base grid. This allows us to constrain the possibilities available to a component to only what's defined in our spacing system.

In practice one should rarely use concrete pixel values.

Don't do this

<Box m="18px" py="6px" pt="12px" />

Do this

<Box m={4} py={2} pt={3} />

Spacing Scale

Theme Token
Size
theme.space[0]
0
theme.space[1]
0.25rem
theme.space[2]
0.5rem
theme.space[3]
0.75rem
theme.space[4]
1rem
theme.space[5]
1.25rem
theme.space[6]
1.5rem
theme.space[7]
2rem
theme.space[8]
3rem
theme.space[9]
4rem
theme.space[10]
6rem
theme.space[11]
8rem