Edit page

Checkbox

Checkboxes allow the user to select multiple options from a set. Checkboxes are aligned properly and given a focus state consistent with other form elements. Other than that they are left as is.

Import Syntax

Basic Usage

Some Checkboxes:
Horizontal Checkbox List:
horizontal
Checkboxes with Error:You can display an error too!
error

With Formik

Choose your SDKs:
{
  "sdks": "",
  "terms": ""
}

Props

PropertyTypeRequiredDefaultDescription
disabledBoolfalsefalseWhether the Checkbox is currently disabled.
onChangeFuncfalse() => {}Event called when the Checkbox value should be toggled.
childrenNodefalse-The label text of the Checkbox.
valueStringfalse-The form value for this Checkbox.
nameStringfalse-The name to be shared among Checkboxes in a group.
checkedBoolfalse-Whether the Checkbox is currently checked.
labelStyleObjectfalse-Style object passed down to the label.