Stack
Flex container for arranging children in a line with consistent spacing.
Layout props (direction, align, justify, gap) accept a single value or a
per-breakpoint responsive object like { base: "column", md: "row" }; set responsiveMode
to "container" to resolve breakpoints against the nearest container instead of the viewport.
Stacks vertically by default.
Usage
Best practices
Stackis a gapped one-axis line, vertical by default - useHStack/VStackto lock direction; for full flexbox control (justify/wrap) reach forFlex.asandrenderare mutually exclusive (renderwins, dev-warned);asdraws from the closed layout vocabulary, soas="button"is a type error (useButton).Use
asto change the element (a tag); userenderonly to swap in a component (e.g. a router Link). Neverrender={<Box as=…/>}- passasdirectly.
Props
HStack
Stack
VStack
Also exports
- interface
StackProps