@k8ordo/ui

Stack

Lays children out in a row or a column with equal gaps. gap comes from the spacing tokens.

Import

ts
import { Stack } from '@k8ordo/ui';

Usage

ActivePendingError
tsx
<Stack direction="row" gap="sm">
  <Badge label="Active" tone="success" />
  <Badge label="Pending" tone="warning" />
  <Badge label="Error" tone="error" />
</Stack>

Direction

ActivePendingError
ActivePendingError
tsx
<Stack direction="column" gap="sm">…</Stack>
<Stack direction="row" gap="sm">…</Stack>

Gap

gap=noneABC
gap=smABC
gap=mdABC
gap=lgABC
gap=xlABC
tsx
<Stack direction="row" gap="none|sm|md|lg|xl">…</Stack>

Align and justify

LCR
tsx
<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: -
PropTypeDefault
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>

k8ordo

React libraries that use Baseline features without holding back.