Stack
Generic flex stack utility component for vertical/horizontal layouts..
Properties
| Property | Attribute | Description | Type name | Type | Default |
|---|---|---|---|---|---|
direction | direction | Main axis (`vertical` | `horizontal`) | DuoStackDirection | "vertical" | "horizontal" | "vertical" |
spacing | spacing | Gap: `none` or space token key (`xxs`…`xxl`; default `m`) | DuoSpacing | (typeof duoSpacingValues)[number] | "m" |
align | align | Cross-axis alignment | DuoStackAlign | "start" | "center" | "end" | "stretch" | "stretch" |
justify | justify | Main-axis alignment | DuoStackJustify | "start" | "center" | "end" | "between" | "start" |
Slots
| Name | Description |
|---|---|
default | Child elements to arrange |
Usage
The Stack layout’s potential is vast. Wherever elements are layered vertically, a Stack likely applies. Only side-by-side elements (like grid cells) shouldn’t use a Stack. Grid cells are probably Stacks, and the grid itself part of a Stack.