Stack
Lays children out in a row or a column with equal gaps. gap comes from the spacing tokens.
Import
Copy code
import { Stack } from '@k8ordo/ui';Usage
ActivePendingError
Copy code
<Stack direction="row" gap="sm">
<Badge label="Active" tone="success" />
<Badge label="Pending" tone="warning" />
<Badge label="Error" tone="error" />
</Stack>Direction
ActivePendingError
ActivePendingError
Copy code
<Stack direction="column" gap="sm">…</Stack>
<Stack direction="row" gap="sm">…</Stack>Gap
gap=noneABC
gap=smABC
gap=mdABC
gap=lgABC
gap=xlABC
Copy code
<Stack direction="row" gap="none|sm|md|lg|xl">…</Stack>Align and justify
LCR
Copy code
<Stack direction="row" align="center" justify="between">…</Stack>Props
align?- Type:
'start'|'center'|'end'|'stretch' - Default: -
children?- Type:
ReactNode - Default: -
direction?- Type:
'row'|'column' - Default:
'column' gap?- Type:
GapSize - Default:
'md' justify?- Type:
'start'|'center'|'end'|'between' - Default: -
padding?- Type:
PaddingSize - Default: -
| Prop | Type | Default |
|---|---|---|
align? | 'start'|'center'|'end'|'stretch' | - |
children? | ReactNode | - |
direction? | 'row'|'column' | 'column' |
gap? | GapSize | 'md' |
justify? | 'start'|'center'|'end'|'between' | - |
padding? | PaddingSize | - |
Inherited attributes (except the ones set internally): HTMLAttributes<HTMLDivElement>