Components / Layout

Stack macrolite

A flex container that lays its children out in one direction with a gap.

Built from
Box
A2UI basic
RowColumn
Children
many
Loading the renderer…
Stack rendered by the React renderer on Web
Web React
Stack rendered by the SwiftUI renderer on iOS
iOS SwiftUI
Stack rendered by the Compose renderer on Android
Android Compose
Stack rendered by the gpui renderer on Desktop
Desktop gpui

View exponential-ui-stack, painted by each native renderer.

direction · horizontal
direction · vertical
wrap
PropTypeDefaultDescription
directionresphorizontal | vertical"vertical"A row or a column ({base: "vertical", md: "horizontal"}).
gaprespnone | xs | sm | md | lg | xl"md"The space between children.
alignrespstart | center | end | stretch"stretch"Cross-axis alignment of the children.
justifyrespstart | center | end | between | around | evenly"start"Main-axis distribution of the children.
wraprespbooleanfalseLets children wrap onto new lines.
stylestyle–Extra Box styles merged over the stack's own.

No events, no slots. Children: many.

Role
none
Semantics
none (layout only)

Not focusable; no keys.

Recipe parts
Stack/root
Keyed by
:hover:pressed:focus:disabled:checked:open:selected:invalid:dragover

Themes · Write a theme