Skip to main content

Spacer

The Spacer component creates empty space between elements. It can define a specific size or act as a flexible spring to push components apart.

Usage

Props

string | number
Fixed size of the space. Presets: xs, sm, md, lg, xl, 2xl. If not provided, it acts as flex: 1.
boolean
Force horizontal spacing (width).
boolean
Force vertical spacing (height).

Examples

Flex Spacer

Using Spacer without props inside a flex container pushes content to the edges.

Fixed Spacing