Checkboxes
Checkboxes allow the user to select multiple options from a set.
<>
{function Example() {
const [checked, setChecked] = React.useState(false);
return (
<Checkbox
label="Cookies"
checked={checked}
onChange={(evt) => setChecked(!!evt.currentTarget.checked)}
/>
);
}}
</>
<Checkbox label="Pizza" />
<Checkbox>Icecream</Checkbox>
<>
<Checkbox label="Broccoli" indeterminate />
<Checkbox label="Always On" checked />
<Checkbox label="Always Off" checked={false} />
</>
Checkbox
A Checkbox component.
Props
Name | Type | Description |
---|
indeterminate | undefined | false | true | Make the control indeterminate |