Stack
Vertical layout with token spacing.
Stacks children in a column with a gap from the spacing scale. Stack and Inline share one internal flex implementation, so their alignment props behave identically.
Import
import { Stack } from "@abbainitiative/ui";Also available from the subpath entry @abbainitiative/ui/stack.
This component has no state and no event handlers, so it renders inside a Server Component without a client boundary of your own.
Examples
Vertical rhythm
First
Second
Third
<Stack gap={3}>
<Text>First</Text>
<Text>Second</Text>
<Text>Third</Text>
</Stack>Props
| Prop | Type | Default | Description |
|---|---|---|---|
| gap | SpaceToken | Space between children. | |
| align | "start" | "center" | "end" | "stretch" | "baseline" | Cross-axis alignment. | |
| justify | "start" | "center" | "end" | "between" | "around" | "evenly" | Main-axis distribution. | |
| fullWidth | boolean | false | Stretch to fill the container's inline size. |
Accessibility
- Purely presentational; contributes no semantics.
- Use `as="ul"` when the stacked items are genuinely a list.