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