Skip to main content

Stack

A flexible layout component for consistent spacing between items.

Examples​

<Stack direction="vertical" gap="md">
<Button>Item 1</Button>
<Button>Item 2</Button>
<Button>Item 3</Button>
</Stack>
<Stack direction="horizontal" gap="lg" justify="space-between">
<span>Left</span>
<span>Right</span>
</Stack>

Interactive Playground​

For more examples and interactive testing, see the Stack component story in Storybook (run npm run storybook --workspace=packages/ui).