Checkbox
onChange receives the new boolean. indeterminate shows the mixed state.
description adds a muted line under the label and links it to the input with aria-describedby, without changing the checkbox's accessible name.
Can command Minions and manage the banana budget
Props
descriptionReactNodeSecondary line under the label, linked with
aria-describedby.labelReactNodeLabel text.
checkedbooleanChecked state.
onChange(checked: boolean) => voidCalled with the new state.
indeterminatebooleanDefault:falseShow the mixed state.
disabledbooleanDefault:falseDisable the control.
classNamestringDefault:''Extra classes for the root element.
...restAny other props are passed to the underlying element.
| Prop | Type | Default | Description |
|---|---|---|---|
description | ReactNode | – | Secondary line under the label, linked with aria-describedby. |
label | ReactNode | – | Label text. |
checked | boolean | – | Checked state. |
onChange | (checked: boolean) => void | – | Called with the new state. |
indeterminate | boolean | false | Show the mixed state. |
disabled | boolean | false | Disable the control. |
className | string | '' | Extra classes for the root element. |
...rest | – | Any other props are passed to the underlying element. |