Stack is a simple flexbox component that allows you to stack items vertically or horizontally with a provided gap.
Available on pages, record tabs and in dialogs.
Example
metric-card.tsx
Props
'column' | 'row'
The axis the children are laid out along.Defaults to
"column".Spacing
The space between children. See spacing tokens.Defaults to
"none".'start' | 'center' | 'end' | 'stretch'
How children are aligned on the cross axis.Defaults to
"stretch".'start' | 'center' | 'end' | 'space-between'
How children are distributed along the main axis.Defaults to
"start".React.ReactNode
The content of the stack, either text or other components.
Spacing tokens
Stack and Grid take their gap from the same Spacing type. There are no arbitrary values.