Checkbox
stable llms.txtCustom checkbox with checked, unchecked, and indeterminate states, group binding, and form compatibility.
Installation
bash
ts
Preset Configuration
Customize the appearance using presets
Examples
Explore different variations and use cases
Basic Checkbox
Simple checkbox with label
Checkbox Group
Multiple checkboxes for multi-select
Indeterminate State
Checkbox with indeterminate state for partial selection
Disabled Checkbox
Checkbox in disabled state
API Reference
Accessibility
- Uses role="checkbox" with aria-checked for correct screen reader semantics
- Supports aria-checked="mixed" for the indeterminate state
- Wraps a hidden native <input type="checkbox"> for form compatibility
- Click and keyboard (Space) support for toggling
- Associates with a <label> via id/for for an enlarged click target
- Disabled state prevents interaction and can be read by assistive technologies