Ethereal Garden

Checkbox

A control that allows the user to toggle between checked and unchecked states.

When To Use

Use checkboxes when you need to allow users to:

  • Select one or multiple items from a list
  • Toggle a single option on or off
  • Accept terms and conditions
  • Enable or disable a setting
  • Mark tasks as complete

Checkboxes are useful for binary choices or multiple selections, as they allow users to select any number of options from a group.

Examples

Basic

Checkbox Group

Selected: None

Disabled

Custom Styling

Props

Checkbox

PropTypeDefault
onCheckedChange?
((checked: CheckedState) => void)
-
required?
boolean
-
checked?
CheckedState
-
asChild?
boolean
-
value?
string | number | readonly string[]
-
type?
"button" | "submit" | "reset"
-
name?
string
-
formTarget?
string
-
formNoValidate?
boolean
-
formMethod?
string
-
formEncType?
string
-
formAction?
string | ((formData: FormData) => void | Promise<void>)
-
disabled?
boolean
-
key?
Key | null
-
form?
string
-

Checkbox Indicator

PropTypeDefault
forceMount?
true
-
asChild?
boolean
-
key?
Key | null
-