Skip to content

Spacer

A flex-grow filler — inserts elastic empty space between siblings inside a flex container so you don't have to reach for justify-content.

  • stable
  • since v0.1.0
  • 0.42 kB
  • primitive
  • layout
  • flex

Empty <div> with aria-hidden="true"; never receives focus and never carries readable content.

Preview
Open
tsx

Drop more than one Spacer to distribute leftover space evenly between groups. Reads better than justify="space-between" when group counts vary or when the structure is dynamic.

Preview
Open
tsx
PropTypeDefaultDescription
className
string
Additional class names appended after Cynosure's base classes.
style
CSSProperties
Inline style overrides merged last.
aria-hidden
boolean
true
Override the implicit `aria-hidden="true"` if Spacer participates in a meaningful layout that assistive tech should observe.
  • Toolbar with logo / nav / actions: <Inline align="center"><Logo /><Spacer /><Nav /><Spacer /><Actions /></Inline>.
  • Pin a footer to the bottom inside a column flex: <Stack flex="1"><Content /><Spacer /><Footer /></Stack>.
  • Spacer is for flex layouts only — outside a flex parent it has no effect; use margin or token-sized Box instead.