RadioSelect
A radio group: several radio items in one group, mutually exclusive with at most one selected.
Basic usage
The selected value uses the value / defaultValue / onChange channels. Clearing the current selection never produces a new value — onChange's argument is always the newly selected value.
Current selection: medium
With FieldLayout
To give the whole group a field label, wrap it with FieldLayout; the label is associated with the group container, and clicking it focuses the group.
Disabled
- An option's own
disabledskips that item (not selectable). - Component-level
disableddisables every option in the group, and the group state wins. See Selection and options · Disabled.
Keyboard and focus
- Focus rests on the whole group (individual items are not in the Tab order). ↑↓←→ move cyclically between non-disabled items and select directly; Enter re-affirms the current item.
- On first Tab focus to the group with nothing selected, the first non-disabled item is auto-selected (matching native radio-group behavior).
onChange's second argument is the nativechangeevent; changing selection via arrow keys does not fire a nativechange(matching the original), so the second argument may be absent.
API
See also
- A single radio: RadioInput (this component is built from it item by item; use it alone for custom layout)
- Option data and the keyboard focus model: Selection and options
- The checkbox counterpart: CheckboxMultiselect