Stack

A flexible layout component that uses flexbox to create responsive layouts with easy alignment and spacing.

Import

import { Stack } from '@vortex-kit/vortex';
import type { StackProps } from '@vortex-kit/vortex';

Display

<Stack direction="row" gap={4} align="center">
      <Stack.Item grow>
          {children}
      </Stack.Item>
</Stack>

Allied components

Stack

Prop
Type
Default
children
React.ReactNode
as
keyof React.JSX.IntrinsicElements
div
divider
boolean
direction
union
gap
number
wrap
boolean
align
union
justify
union
height
union
width
union
aspectRatio
number
maxHeight
union
maxWidth
union
minHeight
union
minWidth
union
padding
number
paddingTop
number
paddingBottom
number
paddingStart
number
paddingEnd
number
paddingInline
number
paddingBlock
number
margin
number
marginTop
number
marginBottom
number
marginStart
number
marginEnd
number
marginInline
number
marginBlock
number
bleed
number
textAlign
union
backgroundColor
union
borderColor
union
borderRadius
union
position
union
relative
inset
number
insetStart
number
insetEnd
number
insetTop
number
insetBottom
number
zIndex
number
overflow
union
animated
boolean
className
union
attributes
G.Attributes<TagName>
grow
boolean

Stack.Item

Prop
Type
Default
gap
string
wrap
boolean
nowrap
union
order
number
columns
union
grow
boolean
gapBefore
union
as
keyof React.JSX.IntrinsicElements
div
attributes
G.Attributes<TagName>
className
union
children
React.ReactNode
Stack Primitive Props — Vortex Design System