Import
Basic Usage
Key Features
- Manages state for radio button selection
- Controlled and uncontrolled modes
- Keyboard navigation (arrow keys)
- Works with Field component for validation
- Accessible with proper ARIA attributes
- Supports horizontal and vertical orientation
Key Props
value
Type:any
The controlled value of the radio item that should be currently selected. Use with onValueChange for controlled mode.
defaultValue
Type:any
The uncontrolled value of the radio button that should be initially selected.
onValueChange
Type:(value: any, eventDetails: ChangeEventDetails) => void
Callback fired when the value changes.
disabled
Type:boolean
Default: false
Whether the component should ignore user interaction.
readOnly
Type:boolean
Default: false
Whether the user should be unable to select a different radio button in the group.
required
Type:boolean
Default: false
Whether the user must choose a value before submitting a form.
name
Type:string
Identifies the field when a form is submitted.
inputRef
Type:React.Ref<HTMLInputElement>
A ref to access the hidden input element.
Styling
- Tab Title
- Tab Title