Skip to main content

Spacing Scale

When you using the m (margin), p (padding), width or other spacing props of component, you can just pass 1, 2...etc number for spacing:

Spacing Scale

The space utility converts shorthand margin and padding props to margin and padding CSS declarations.

  • Numbers from o, h, 0-10, 12 and 16 are converted to values on the spacing scale (see following table).
  • Negative values can be used for negative margins.
  • Numbers greater than the length of the theme.space array are converted to raw pixel values.
  • String values are passed as raw CSS values.

spacing scale table#

Spacing Keyrempx
o0.0625rem1px
h0.125rem2px
000
10.25rem4px
20.5rem8px
30.75rem12px
41rem16px
51.25rem20px
61.5rem24px
71.75rem28px
82rem32px
92.25rem36px
102.5rem40px
123rem48px
164rem64px