Spacing
A consistent spacing system ensures visual harmony and rhythm across all components and layouts. Brand uses a defined scale of spacing tokens.
View current brand spacing values:
Spacing Scale
The spacing system is built on a consistent scale that provides options for tight to relaxed layouts. Use these tokens consistently to maintain visual rhythm.
Extra Small4px
--spacing-xsSmall8px
--spacing-smMedium16px
--spacing-mdLarge24px
--spacing-lgExtra Large32px
--spacing-xlExtra Extra Large48px
--spacing-xxlUsage
1/* Using spacing tokens */2.card {3 padding: var(--spacing-md);4 margin-bottom: var(--spacing-lg);5}67.button {8 padding: var(--spacing-sm) var(--spacing-md);9}1011.section {12 padding: var(--spacing-xxl) var(--spacing-xl);13}
Spacing Guidelines
Component Internal Spacing (Padding)
xs(4px) - Tight spacing within compact elementssm(8px) - Default padding for small componentsmd(16px) - Standard component paddinglg(24px) - Generous padding for cards and containers
Component External Spacing (Margin)
sm(8px) - Tight spacing between related itemsmd(16px) - Standard spacing between componentslg(24px) - Section breaks and component groupsxl(32px) - Major section separationsxxl(48px) - Page section padding
Design Token Reference
| Token | Value | Use Case |
|---|---|---|
--spacing-xs | 4px | Badge padding, icon gaps |
--spacing-sm | 8px | Button padding, list item gaps |
--spacing-md | 16px | Card padding, form field gaps |
--spacing-lg | 24px | Section padding, card margins |
--spacing-xl | 32px | Major component spacing |
--spacing-xxl | 48px | Page section padding |
