Checkbox - Keep React
Table of Contents#
Default Checkbox#
The default checkbox is a square checkbox that can be checked or unchecked.
Checkbox Variant#
The Checkbox component offers three variants: rounded
,circle
and default
. You can use the variant
prop to specify the desired variant.
API Reference#
Here is a list of the props that you can pass to the Checkbox component:
Property | Description | Type | Default |
---|---|---|---|
variant | Checkbox Variant | default rounded circle | default |
color | Checkbox color | primary secondary success warning error | primary |
defaultChecked | Checked state of the checkbox | boolean | false |
checked | Checked state of the checkbox | function | false |
onCheckedChange | Event handler called when the checked state of the checkbox changes. | function | (value)=>{} |
Reference#
Our checkbox component is built using the @radix-ui/react-checkbox
package. For more information , follow the documentation @radix-ui/react-checkbox.