Stack

The Stack component arranges content vertically with predictable spacing and alignment.

Usage & Examples

Vertical Content

PlanChoose a workspace plan.
MembersInvite your collaborators.
LaunchPublish when everything is ready.
vertical-content.tsx
const tileStyle = {
  boxSizing: "border-box",
  display: "flex",
  flexDirection: "column",
  justifyContent: "center",
  width: "100%",
  height: "100%",
  minHeight: "4.5rem",
  padding: "1rem",
  border: "1px solid var(--border-color)",
  borderRadius: "var(--border-radius-md, 0.75rem)",
  background: "var(--background-color-surface)",
};

<Stack gap="sm">
  <div style={tileStyle}><strong>Plan</strong><span>Choose a workspace plan.</span></div>
  <div style={tileStyle}><strong>Members</strong><span>Invite your collaborators.</span></div>
  <div style={tileStyle}><strong>Launch</strong><span>Publish when everything is ready.</span></div>
</Stack>

Props API

8 props
Columns
Stack props API
Default
Description
alignLayoutAlignNopropsAlign prop for LayoutPrimitive.
asElementTypeNopropsAs prop for LayoutPrimitive.
childrenReactNodeNopropsContent rendered inside the component.
classNamestringNostylingAdditional CSS class names for the component root.
data-testidstringNotestingTest id used to identify the component in tests.
gapLayoutGapNoprops"md"Gap.
justifyLayoutJustifyNopropsJustify prop for LayoutPrimitive.
testIdstringNopropsTest id used to identify the component in tests.