Layout

Layout primitives for composing consistent spacing without ad-hoc flex/gap props everywhere.

Stack

Vertical flex container. space is required and accepts any gap token or responsive object.

Basic usage

Item one
Item two
Item three

Space tokens

x-small
small
medium
large
x-large

Responsive space

space accepts a responsive object. Resize the window to see the gap change.

Tight on mobile, loose on tablet+
Tight on mobile, loose on tablet+
Tight on mobile, loose on tablet+

Alignment

left
center
right

Responsive alignment

align accepts a responsive object. This example is left-aligned on mobile, centered on tablet+.

Semantic element

Use as="ul" to produce a proper list in the DOM while keeping Stack's spacing.

  • List item one
  • List item two
  • List item three

Inline

Horizontal flex container that wraps. space is required. Children get minWidth: 0 to prevent overflow.

Basic usage

Item one
Item two
Item three

Space tokens

x-small
small
medium
large
x-large

Alignment

left
A
B
C
center
A
B
C
right
A
B
C

Vertical alignment

top
Short
Tall
Short
center
Short
Tall
Short
bottom
Short
Tall
Short

Wrapping

Items wrap naturally when they exceed the container width.

Alpha
Beta
Gamma
Delta
Epsilon
Zeta
Eta
Theta
Iota
Kappa

Collapse below breakpoint

Stacks vertically below the given breakpoint, inline above it. Resize the window to see the change.

Item one
Item two
Item three

Semantic element

Use as="ul" for tag lists or navigation.

  • Tag one
  • Tag two
  • Tag three

Spread

Distributes children with justify-content: space-between. Use for headers (logo | nav), card footers (label | action), or any two-ended layout.

Horizontal

Left
Right

Multiple children

One
Two
Three

Vertical alignment

top
Short
Tall
Short
center
Short
Tall
Short
bottom
Short
Tall
Short

Vertical direction — horizontal alignment

left
left
center
center
right
right