Radio API
API reference docs for theRadio
component. For examples and details on the usage of this component, visit the component demo page.
Props
Prop | Type | Description | Default |
---|---|---|---|
|
| Label for the radio button, typically required for accessibility purposes. | _ |
|
| When |
|
|
| The size of the radio. |
|
|
| The value of the radio button. | _ |
|
| Indicates whether the radio is checked, used in controlled components. | _ |
|
| A unique ID for the radio button. | _ |
|
| The name attribute of the radio, useful for grouping in forms. | _ |
|
| Description text displayed alongside the radio, providing additional context. | _ |
|
| Defines the ID of the element that provides additional information about the radio for accessibility purposes. | _ |
|
| Event handler for when the radio loses focus. | _ |
|
| Event handler for when the radio is clicked. | _ |
|
| Function called when the radio value changes. | _ |
Note: For id
and aria-describedBy
if a value is provided, the IDs will be merged. Otherwise, React.useId
will be used to generate unique IDs to associate the labels appropriately.