Checkbox

Single binary or tri-state control on bits-ui Checkbox. Border eases to primary on check, the tick icon pops in without layout shift, and the focus ring sits outside the shape so nothing reflows.

Usage

States

API reference

Inherits bits-ui Checkbox.Root props via spread. Supports indeterminate as a bindable third state alongside checked.

PropTypeDescription
boolean (bindable)Whether the box is checked. Two-way bindable.
boolean (bindable)Shows the dash icon and reports mixed to assistive tech. Setting true clears checked visually.
booleanDisables the control and drops opacity to 50%.
(checked: boolean) => voidFires whenever the checked state changes.
'true' | 'false'Flips the border and focus ring to destructive. Pair with field-error for the text.
HTMLButtonElement | nullTwo-way-bindable element reference.
stringMerged onto the root via tailwind-merge.