Spacing tokens define distance, not intent. They are reused for gaps, padding, and margins depending on context. For the full list of spacing token values, see the Tokens page.
The system is built in layers: unit tokens (raw values) → space tokens (semantic aliases) → utility classes (applied in HTML). Always use space tokens or utility classes — never hardcode pixel values.
Space Scale
The space scale provides a visual reference for the spacing tokens used throughout the system.
| Token | Value | px Equivalent |
|---|---|---|
| 0 | 0px | |
| 0.125rem | 2px | |
| 0.25rem | 4px | |
| 0.5rem | 8px | |
| 0.75rem | 12px | |
| 1rem | 16px | |
| 1.5rem | 24px | |
| 2rem | 32px | |
| 2.5rem | 40px | |
| 3rem | 48px | |
| 3.5rem | 56px | |
| 4rem | 64px | |
| 4.5rem | 72px | |
| 5rem | 80px | |
| 5.5rem | 88px | |
| 6rem | 96px |
2xs · 2px
xs · 4px
s · 8px
m · 12px
l · 16px
xl · 24px
2xl · 32px
3xl · 40px
4xl · 48px
6xl · 64px
8xl · 80px
10xl · 96px
padding: var(--space-m);
gap: var(--space-xl);
margin-bottom: var(--space-l);
Gap
Gap modifiers control the space between child elements inside a . The default gap is .
No gap
Extra Small
Small
Default gap
Large
Extra Large
<div class="block gap-l">
<div>Item one</div>
<div>Item two</div>
<div>Item three</div>
</div>
| Class | Value | px Equivalent |
|---|---|---|
| 0 | 0px | |
| 4px | ||
| 8px | ||
| 12px | ||
| 16px | ||
| 24px | ||
| 32px | ||
| 40px |
Padding
Padding utilities apply internal spacing to an element on all sides.
.padding-s
.padding-m
.padding-l
.padding-xl
<div class="padding-l">
<!-- Content with large padding on all sides -->
</div>
| Class | Value | px Equivalent |
|---|---|---|
| 8px | ||
| 12px | ||
| 16px | ||
| 24px | ||
| 32px | ||
| 40px |
Section Spacing
Section spacing controls the vertical rhythm between major page sections. Apply .top-* and .bottom-* classes to <section> elements. These scale responsively between desktop and mobile.
Top spacing
Bottom spacing
<section class="top-medium bottom-medium">
<!-- Section content -->
</section>
| Class | Token | Desktop | Mobile |
|---|---|---|---|
| / | 32px | 24px | |
| / | 64px | 32px | |
| / | 96px | 56px | |
| / | 160px | 80px |