layout

Stack

Flexbox ベースのレイアウトプリミティブ。スペーシングトークンに基づくギャップで、縦・横のスタックを構成。

インポート

import { Stack } from '@stella-ds/react'

Props

Propデフォルト説明
direction'vertical' | 'horizontal''vertical'Flex direction
gap'1' | '2' | '3' | '4' | '6' | '8' | '12' | '16''4'Gap using spacing tokens
align'start' | 'center' | 'end' | 'stretch''stretch'align-items
justify'start' | 'center' | 'end' | 'between' | 'around''start'justify-content
wrapbooleanfalseWrap flex items
asChildbooleanfalseRadix Slot pattern

Preview

Horizontal Stack

Active

Item 1

Item 2

Item 3

使用例

Horizontal

<Stack direction="horizontal" gap="4" align="center">
  <Avatar alt="U" size="sm" />
  <Text weight="medium">Username</Text>
</Stack>
Skeleton
コンポーネント一覧
Switch