Components · Layout
Stack
StableAdded v0.0.1
Vertical stack layout with configurable gap.
import { Stack } from '@nexub/react';Playground
Props
direction
<Stack gap="md">…</Stack>Examples
Default
With dividers
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| gap | string | number | — | Spacing between child elements. |
| align | string | — | Cross-axis alignment of children. |
| divider | React.ReactNode | — | Element rendered between each pair of children, e.g. <Separator />. |
| asChild | boolean | false | |
| direction | 'row' | 'column' | 'column' | |
| justify | string | — | |
| wrap | boolean | false |
On iOS & Android
Web only
Stack has no @nexub/react-native twin. On phones, follow the platform pattern instead, or compose it from the native components listed on the React Native page.