bit Bheadless

Checkbox

An accessible tri-state checkbox primitive styled with Tailwind utilities.

Implementation: CSS Tailwind

Basic Checkbox (Uncontrolled)

Native <button> with role="checkbox". Click or press Space to toggle.

Controlled

External Checked + OnCheckedChange.

Terms accepted: no

Disabled

The custom data-disabled: variant applies the disabled visuals.

Indeterminate (Select All pattern)

data-state-indeterminate: styles the mixed state — the parent reflects partial child selection.

With label

Wrap in <label> for clickable text.

Form Submission

Name renders an adjacent hidden input.

Group with select all

BitBhCheckboxGroup binds one collection with @bind-Values; SelectAll="true" makes the tri-state parent (aria-checked="mixed" when only some are selected). The box is styled from the checkbox with group-data-state-checked: / group-data-state-indeterminate:.

Values: Cheese, Olives
An unhandled error has occurred. Reload 🗙