Radio buttons give customers the ability to make a single selection from a group of two or more mutually exclusive options.
| Name | Description | Default |
|---|---|---|
| disabled | @deprecated use The All DLS components are designed to use the boolean | - |
| aria-disabled | If true, styles component as disabled and prevents interactivity. Screen reader reads as "dimmed" or "disabled". Booleanish | - |
| label* | The label text describing the string | ReactElement<any, string | JSXElementConstructor<any>> | - |
| checked | The checked state of the RadioButton (controlled component). This is automatically set
when the boolean | - |
| value* | The value associated with the string | number | readonly string[] | undefined | - |
| onChange | The event handler for change events on the radio input field. ChangeEventHandler<HTMLInputElement> | - |
| defaultChecked | The default checked state of the boolean | - |
| id* | The ID that identifies and matches the label and the input elements. string | - |
| children | Additional children, like hint text, to render. ReactNode | - |
| isInvalid | Sets error styles. boolean | - |
| reactlytics | ReactlyticsProp | - |
| Name | Description | Default |
|---|---|---|
| legend* | The text to set inside of the string | ReactElement<any, string | JSXElementConstructor<any>> | - |
| children* | Children to render in the radio group - typically NonNullable<ReactNode> | - |
| isLegendVisuallyHidden | If true, visually hides the boolean | - |
| value | The value of the string | number | readonly string[] | - |
| onChange | The event handler for change events on any of the ChangeEventHandler<HTMLInputElement> | - |
| defaultValue | The default value of the string | number | readonly string[] | - |
| orientation | Controls the orientation that the RadioGroup's children are rendered in. "horizontal" | "vertical" | vertical |
| aria-invalid | Sets aria-invalid to true and sets error styles. Booleanish | - |
| disabled | @deprecated use The All DLS components are designed to use the boolean | - |
| aria-disabled | If true, styles component as disabled and prevents interactivity. Screen reader reads as "dimmed" or "disabled". Booleanish | - |
Connect with the DLS Team on Slack or by email.
Check out additional resources.