Components
Stack
Vertical layout container based on flexbox column
Overview
Stack is a vertical layout container. display: flex and flex-direction: column are applied by default.
- Polymorphic — Render as any HTML element via the
asprop - Sprinkles support — All design token props available
It is the vertical counterpart of Inline. The API is identical.
Basic Usage
Direction
Interactive Elements
Stack is a layout container and has no hover or pressed styles. For something people click, use a component that owns its states, such as Button or IconButton.
Props
| Prop | Type | Default | Required | Description |
|---|---|---|---|---|
as | ElementType | 'div' | No | Element to render |
direction | 'column' | 'column-reverse' | 'column' | No | Column direction |
gap | Space token | - | No | Space between children |
align | Sprinkles['alignItems'] | - | No | Cross-axis alignment (align-items) |
justify | Sprinkles['justifyContent'] | - | No | Main-axis alignment (justify-content) |
wrap | Sprinkles['flexWrap'] | 'nowrap' | No | Whether children wrap |
Guidelines
- Use Stack for listing form fields or arranging content inside cards
direction="column-reverse"is useful for reverse-scroll UIs like chat- Combining Inline and Stack allows building complex layouts with token-based spacing