Checkbox
Interactive component that allows users to make a binary choice, often used in forms and settings.
API Reference
Usage
Properties
The Checkbox
component extends the Bits UI <Checkbox>
component. Find the full list of available properties in the official Bits UI documentation.
Checkbox
Prop | Type | Default |
---|---|---|
error | boolean | false |
Examples
Group
Use the CheckboxGroup
component to organize multiple checkboxes in a stack with consistent spacing.
Indeterminate
Use the indeterminate
state to indicate that some, but not all, of the checkboxes in a group are selected.
Description
Use the Description
component to provide additional information and helpful context about the checkbox.
Sublabel
Use the Sublabel
component to add a secondary label to the checkbox.
Reversed
Place the Checkbox
last in the CheckboxField
component to make the checkbox appear on the right side of the label.
Error
Use the error
property to indicate that the checkbox has an error.
Disabled
Use the disabled
property to prevent users from interacting with the checkbox.