Stack

The Stack component is used to create space between sibling components. It should be used to compose groups of components in a consistent manner.

By default, the gap is applied on the y axis (vertically), but it can also be applied horizontally.

Props

NameTypeDefaultDescription
gapnumber | string | (string | number)[]1The gap size can be a spacing value from the theme, an absolute value, or an array thereof to create a responsive gap.
axis'x' | 'y''y'The axis on which the gap is applied to children.

Usage

Axis

Responsive gap

Absolute gap