Stack

Beta notice: This page is being built.Edit on GitHub(opens in new tab)

Arranges View content using the LongLink spacing scale.

longlink docs component "Stack"

Example

Properties

Stack - Properties
childrenReactNode
Stack content.
widthstring | number
Container width; numbers are pixels and strings are CSS sizes.
heightstring | number
Container height; numbers are pixels and strings are CSS sizes.
maxWidthstring | number
Maximum container width; numbers are pixels and strings are CSS sizes.
minHeightstring | number
Minimum container height; numbers are pixels and strings are CSS sizes.
gap0 | 0.5 | 1 | 1.5 | 2 | 3 | 4 | 5 | 6 | 8 | 10
Spacing between items.
padding0 | 0.5 | 1 | 1.5 | 2 | 3 | 4 | 5 | 6 | 8 | 10
Inner padding using the spacing scale.
paddingInline0 | 0.5 | 1 | 1.5 | 2 | 3 | 4 | 5 | 6 | 8 | 10
Horizontal padding, overriding padding on the inline axis.
paddingBlock0 | 0.5 | 1 | 1.5 | 2 | 3 | 4 | 5 | 6 | 8 | 10
Vertical padding, overriding padding on the block axis.
background"muted"
Optional muted surface background; omitted stacks remain transparent.
direction"horizontal" | "vertical"
Horizontal or vertical layout direction.
justify"start" | "center" | "end" | "between" | "around" | "evenly"
Main-axis alignment.
align"start" | "center" | "end" | "stretch"
Cross-axis alignment alias. Mirrors CSS align-items.
wrap"nowrap" | "wrap" | "wrap-reverse"
Flex wrap behavior.
StackItem - Properties
childrenReactNode
Content rendered inside the stack item.
size"fill" | "static"
isScrollableboolean
crossAlignSelf"start" | "center" | "end" | "stretch"
Overrides this item's cross-axis alignment; omitted values inherit the parent alignment.