Axon 911 Frontend DocsAxon 911 Frontend Docs
Axon 911 Frontend Docs
    Loading navigation…
U
User
Switch to light mode
  1. Foundations
  2. Spacing

Spacing

Space tokens consumed by Box, FlexBox, and layout primitives.

Space tokens are the --space-* custom properties in @prepared911/ui/tokens.css. The step is the pixel size in the name. --space-16 is 1rem (16px at the default root).
NameTypeDefaultDescription
--space-4dimension0.25remTight inset for icons and inline meta.
--space-8dimension0.5remDefault gap between an icon and a label.
--space-16dimension1remComfortable padding. Box padding={16} uses this step.
--space-24dimension1.5remSeparation inside a section.
--space-32dimension2remLarge gutters. --space-48, --space-64, --space-80, --space-96, and --space-128 continue the scale.
Principles
  • Components own inner padding. Parents own outer gaps.
  • Use FlexBox gap instead of margins between siblings.
  • Pass a space step number to padding, margin, and gap. Logical sides use blockStart, inlineEnd, blockEnd, and inlineStart.
Previous
Icons
Next
Elevation
On this page
Principles