Checkboxes allow users to select one or more items from a predefined list of independent options.
| Name | Description | Default |
|---|---|---|
| children* | Children to render in the checkbox group NonNullable<ReactNode> | - |
| legend* | A string or elements to be placed on the legend string | ReactElement<any, string | JSXElementConstructor<any>> | - |
| isLegendVisuallyHidden | If true, visually hides the boolean | - |
| orientation | Controls the orientation that the CheckboxGroup's children are rendered in. "horizontal" | "vertical" | vertical |
| aria-invalid | Flag to indicate that each Checkbox in the CheckboxGroup is in an invalid state Booleanish | - |
| statusMessage | The status message to be displayed. Will only be displayed if string | - |
| reactlytics | ReactlyticsProp | - |
| Name | Description | Default |
|---|---|---|
| id* | The id of the input field string | - |
| label* | A string or elements to be placed on the label string | ReactElement<any, string | JSXElementConstructor<any>> | - |
| checked | The checked state of the checkbox boolean | - |
| defaultChecked | Flag to use the component in an uncontrolled setting boolean | - |
| aria-invalid | Flag to indicate that the field is in a warning state Booleanish | - |
| value | The string representing the value of the checkbox string | - |
| name | The name of the checkbox string | - |
| aria-describedby | ID of element providing further context and description of the link string | - |
| onChange | The event handler for change events on the input field ChangeEventHandler<HTMLInputElement> | - |
| labelProps | Props to be spread onto the Omit<DetailedHTMLProps<LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>, "ref"> | - |
| iconProps | Props to be spread onto the any | - |
| statusMessage | The status message to be displayed. Will only be displayed if string | - |
| reactlytics | ReactlyticsProp | - |
| 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 | - |
| Name | Description | Default |
|---|---|---|
| aria-controls* | identifies the element (or elements) whose contents or presence are controlled string | - |
| checked | The checked state of the indeterminate checkbox (controlled) boolean | - |
| defaultChecked | The default checked state of the Indeterminate Checkbox (uncontrolled component). boolean | - |
| isIndeterminate | Flag to indicate whether the checkbox is in an indeterminate state boolean | - |
| onClick | The event handler for click events on the indeterminate checkbox ((event: MouseEvent<Element, MouseEvent>, checked: boolean) => void) | - |
| reactlytics | ReactlyticsProp | - |
| label* | A string or elements to be placed on the label string | ReactElement<any, string | JSXElementConstructor<any>> | - |
| id* | The id of the input field string | - |
| aria-disabled | If true, styles component as disabled and prevents interactivity. Screen reader reads as "dimmed" or "disabled". Booleanish | - |
| aria-invalid | Flag to indicate that the field is in a warning state Booleanish | - |
| value | The string representing the value of the checkbox string | - |
| name | The name of the checkbox string | - |
| disabled | @deprecated use The All DLS components are designed to use the boolean | - |
Connect with the DLS Team on Slack or by email.
Check out additional resources.