Stack & Flex
Stack is a vertical Flex; use direction="row" for horizontal. gap is 0-4, 6 or 8. Flex also takes align, justify, wrap and inline.
Left
Props
Stack
direction'column' | 'row'Default:'column'Main axis.
gap0 | 1 | 2 | 3 | 4 | 6 | 8Default:4Spacing between children.
...Flex propsEverything
Flexaccepts.
| Prop | Type | Default | Description |
|---|---|---|---|
direction | 'column' | 'row' | 'column' | Main axis. |
gap | 0 | 1 | 2 | 3 | 4 | 6 | 8 | 4 | Spacing between children. |
...Flex props | – | Everything Flex accepts. |
Flex
direction'row' | 'column'Default:'row'Main axis.
gap0 | 1 | 2 | 3 | 4 | 6 | 8Default:3Spacing between children.
align'start' | 'center' | 'end' | 'stretch' | 'baseline'Cross-axis alignment.
justify'start' | 'center' | 'end' | 'between' | 'around'Main-axis distribution.
wrapbooleanDefault:falseAllow items to wrap.
inlinebooleanDefault:falseUse inline-flex.
classNamestringDefault:''Extra classes for the root element.
asElementTypeDefault:'div'Element or component to render.
childrenReactNodeContent.
...restAny other props are passed to the underlying element.
| Prop | Type | Default | Description |
|---|---|---|---|
direction | 'row' | 'column' | 'row' | Main axis. |
gap | 0 | 1 | 2 | 3 | 4 | 6 | 8 | 3 | Spacing between children. |
align | 'start' | 'center' | 'end' | 'stretch' | 'baseline' | – | Cross-axis alignment. |
justify | 'start' | 'center' | 'end' | 'between' | 'around' | – | Main-axis distribution. |
wrap | boolean | false | Allow items to wrap. |
inline | boolean | false | Use inline-flex. |
className | string | '' | Extra classes for the root element. |
as | ElementType | 'div' | Element or component to render. |
children | ReactNode | – | Content. |
...rest | – | Any other props are passed to the underlying element. |