Spacing tokens for consistent layout and rhythm across the design system.
The spacing scale provides values from 0 to 32px in increments that follow a logical progression:
--space-00px--space-14px--space-28px--space-312px--space-416px--space-624px--space-832pxHere are practical examples of how to use spacing tokens in your components:
Small padding (space-2 = 8px)
Medium padding (space-4 = 16px)
Large padding (space-8 = 32px)
Small gap (space-2 = 8px)
Medium gap (space-4 = 16px)
Large gap (space-6 = 24px)
Stacked elements with margin (space-4 = 16px)
Use the interactive tool below to test different spacing values and see how they affect component layouts:
Padding: var(--space-4)
Gap: var(--space-4)
Margin: var(--space-4)
All spacing values are available as CSS variables:
1234567891011121314151617181920212223242526272829Spacing can be adjusted based on density mode. See Density documentation for more details.