Checkbox - Keep React

The Checkbox Component is a user interface element that allows users to toggle between two states, typically representing selection or deselection. It consists of a small box that can be checked (selected) or unchecked (deselected). Checkboxes are commonly used in forms, lists, and interactive interfaces to enable users to make multiple selections or indicate their preferences.

Table of Contents#

Default Checkbox#

The default checkbox is a square checkbox that can be checked or unchecked.

Keep Design System License

Checkbox Variant#

The Checkbox component offers three variants: rounded,circle and default. You can use the variant prop to specify the desired variant.

Checkbox Variant

API Reference#

Here is a list of the props that you can pass to the Checkbox component:

PropertyDescriptionTypeDefault
variantCheckbox Variant
default
rounded
circle
default
colorCheckbox color
primary
secondary
success
warning
error
primary
defaultCheckedChecked state of the checkboxbooleanfalse
checkedChecked state of the checkboxfunctionfalse
onCheckedChangeEvent 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.