FormRadioGroup
ラジオボタングループコンポーネント。排他的な選択肢を提示する。
|
import { FormRadioGroup } from "@blueai/ui"Examples
Basic
const [value, setValue] = useState("monthly");
<FormRadioGroup
name="billing-cycle"
label="請求サイクル"
value={value}
onChange={setValue}
options={[
{ value: "monthly", label: "月次" },
{ value: "quarterly", label: "四半期" },
{ value: "yearly", label: "年次" },
]}
/>Props
| Prop | Type | Default | Description |
|---|---|---|---|
| name* | string | — | HTML input name 属性 |
| value* | string | — | 選択値 |
| options* | RadioOption[] | — | 選択肢 { value, label } |
| onChange* | (value: string) => void | — | 変更ハンドラ |
| label | string | — | グループラベル |
| direction | "horizontal" | "vertical" | "horizontal" | 配置方向 |
| error | string | — | エラーメッセージ |
| required | boolean | — | 必須マーク表示 |
| disabled | boolean | false | 無効状態 |