A checkbox component that can be used to trigger actions.
Base UI
This component is using Base UI under the hood. While most of the original props are available, we have made some changes to the API to fit our needs.
Prop | Type | Default | Responsive |
---|---|---|---|
label | string | - | No |
defaultChecked | boolean'indeterminate' | - | No |
checked | boolean'indeterminate' | - | No |
onChange | (checked: boolean | 'indeterminate') => void | - | No |
disabled | boolean | - | No |
required | boolean | - | No |
name | string | - | No |
value | string | - | No |
className | string | - | No |
style | CSSProperties | - | No |
Here's a view when checkboxes have different variants.
<Inline alignY="center">
<Checkbox />
<Checkbox checked />
<Checkbox label="Checkbox" />
<Checkbox label="Checkbox" checked />
</Inline>