v14.2.0

Playroom

Github

StackView

View Source

Lay out children in either a column or row. Wraps flexbox styles in a simple API inspired by Apple's UIStackView.

Select a cell above to edit or add a new one

Copy
Edit
Cell 1
Cell 2
Cell 3
Copy
Edit
Cell 1
Cell 2
Cell 3
Copy
Edit

Props

axis'horizontal' | 'vertical'

The axis along which children are laid out.

alignment'start' | 'center' | 'end' | 'stretch' | 'baseline'

The alignment of children perpendicular to the stack view’s main axis.

distribution'start' | 'center' | 'end' | 'fill' | 'space-between' | 'space-evenly'

The distribution of children along the main axis.

spacingnumber | string | ReactReactNode

The amount of space or element that is inserted between each child.

  • Props
PreviousPagerViewNextTileView