Forge Docs
FormRadioGroupField

RadioGroupField

ラジオグループフィールドコンポーネント

概要

排他選択のラジオボタングループ。<fieldset> で描画され、選択肢が縦に並ぶ。

Storybook で確認

Props

Prop型必須説明
labelstringYesフィールドラベル(legend)
options{ label: string; value: string }[]Yes選択肢
descriptionstring—ヘルパーテキスト
errorstring—エラーメッセージ
valuestring—制御値
defaultValuestring—初期値
onValueChange(value: string) => void—変更コールバック
disabledboolean—無効化

使用例

import { RadioGroupField } from "@unitto/ui";

<RadioGroupField
  label="プラン"
  options={[
    { label: "フリー", value: "free" },
    { label: "スタンダード", value: "standard" },
    { label: "プレミアム", value: "premium" },
  ]}
  defaultValue="free"
  onValueChange={(value) => console.log(value)}
/>

On this page