Skip to main content

Spacer

A fixed pixel gap.

Signature

Attributes

Runtime behavior

  • Renders as an empty div with a fixed size; both width and height are set.
  • Provides horizontal spacing inside a Row and vertical spacing inside a Column.
  • It does not affect text layout or the size of other elements.

Example

Gotchas

  • Prefer the parent’s Gap; Spacer is for fine-grained local spacing.
  • It does not grow inside a flex container by default; the current version provides no FlexGrow for filling the remaining space.