An 8-point base grid keeps rhythm consistent across every component and layout. All values are multiples of 4px. Reference tokens as Scale.* — never hardcode pixel values.
Grid rhythm
Dense range (4–16px) grows in 4px steps for precise component internals. Above 16px the scale shifts to 8px steps to govern layout-level spacing.
The core rhythm is 8px. Every layout spacing value is a multiple of 8. This keeps vertical rhythm consistent across components and pages.
The 4px subdivisions handle tight internal spacing — icon gaps, input padding, inline label offsets — without breaking the larger rhythm.
Compact UI elements (4–12px), comfortable containers (16–24px), page-level layout (32px+). Density is intentional, not arbitrary.
Density in practice
Badges, chips, tags, inline icons — 8px padding, 4px gaps.
Buttons, cards, inputs, modals — 16px padding, 8px gaps.
Page sections, hero areas — 32px padding, 16px gaps.
Compact — 4–12px
Scale.4–8Gap between an icon and its adjacent label text.Scale.4Scale.8Scale.8–12Horizontal padding inside badges, chips, and tag elements.Scale.8Scale.12Scale.4Margin between an input and its helper or error text.Scale.4Comfortable — 16–24px
Scale.16Horizontal padding inside primary, secondary, and tertiary buttons.Scale.16Scale.16–24Padding inside card and panel components.Scale.16Scale.24Scale.16Vertical gap between stacked form fields.Scale.16Scale.24Internal padding for dialog and bottom-sheet containers.Scale.24Layout — 32–64px
Scale.32–40Vertical space between major page sections.Scale.32Scale.40Scale.24–40Left/right padding on the main content container.Scale.24Scale.40