RadioButtonGroupInput
A radio group for choosing one value from a list.
Installation
pnpm dlx shadcn@latest add @chelone/radio-button-group-inputA radio group for choosing one value from a list.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| alwaysOn | boolean | — | As a `<FilterForm>`/`<FilterButton>` filter: always shown, never in the add-filter menu. Read off the element by the filter layer, never by the input. |
| choices | readonly string | ChoiceRecord[] | — | |
| defaultValue | unknown | — | Input-level default, ra precedence (seeds only into an untouched hole). |
| disabled | boolean | — | Native disabled state. |
| disableValue | string | — | |
| format | (value: unknown) => unknown | — | Read transform (raw form value → input value). |
| helperText | ReactNode | — | Helper text rendered below the input; a string is translated. |
| id | string | — | Explicit element id; a generated `useId` value is used otherwise. |
| isRequired | boolean | — | Forces the required marker; ORed with `required()` detection on `validate`. |
| label | ReactNode | — | The input label. A string is translated; a ReactNode renders as-is; `false` (or `""`) renders no label. |
| name | string | — | Legacy field-name alias (ra parity); the wiring uses `source`. |
| onBlur | (event: unknown) => void | — | Chained AFTER the blur is recorded. |
| onChange | (eventOrValue: unknown) => void | — | Chained AFTER the parsed value is written to the form. |
| options | RadioGroupProps & RefAttributes<HTMLDivElement> | — | |
| optionText | OptionText | — | |
| optionValue | string | — | |
| parse | (value: unknown) => unknown | — | Write transform (input value → stored value). |
| readOnly | boolean | — | Native read-only state. |
| resource | string | — | Override the ambient resource (used to resolve the default label key). |
| row | boolean | — | |
| source | string | — | The field path RELATIVE to the ambient source scope. |
| translateChoice | boolean | — | |
| type | string | — | The DOM input `type` (text inputs default to `"text"`). |
| validate | Validator | readonly Validator[] | — | ra-contract validators — composed, first error wins. |