inputs
Radio
Radix UI ベースのラジオボタングループ。サイズやエラー状態をコンテキスト経由で全アイテムに伝播。
インポート
import { RadioGroup, RadioItem } from '@stella-ds/react'RadioGroupRadioItem
Props
| Prop | 型 | デフォルト | 説明 |
|---|---|---|---|
| size (RadioGroup) | 'sm' | 'md' | 'lg' | 'md' | Size preset for all items |
| error (RadioGroup) | boolean | false | Error state for all items |
| orientation (RadioGroup) | 'horizontal' | 'vertical' | 'vertical' | Layout direction |
| value (RadioItem) | string | — | Required. Value this item represents |
| label (RadioItem) | ReactNode | undefined | Optional label |
Preview
使用例
Basic
<RadioGroup defaultValue="b">
<RadioItem value="a" label="Option A" />
<RadioItem value="b" label="Option B" />
<RadioItem value="c" label="Option C" disabled />
</RadioGroup>