Basic Usage
With Label
Label text displayed next to the checkbox
Controlled State
Event Handlers
Props Reference
Current checked state (controlled)
Initial checked state (uncontrolled)
Event fired when checkbox is toggled
Disables checkbox interaction
Makes checkbox required for form submission
Prevents changing the checkbox state
Form field name for submission
Value submitted when checkbox is checked
Shows an indeterminate state (neither checked nor unchecked)
Additional CSS classes for styling
Indeterminate State
Useful for “select all” scenarios:Without Label
Compositional API
For custom layouts:Custom Indicator
Real Example
From demo atdemo/demo.py:30:
Checkbox Components
checkbox.root
The clickable checkbox element.checkbox.indicator
The visual checkmark indicator (auto-includes tick icon).Styling Classes
Access predefined styles viaui.checkbox.class_names:
ROOT: Checkbox box styles with statesINDICATOR: Checkmark indicator stylesLABEL: Label text stylesCONTAINER: Wrapper container styles
Form Integration
Implementation Details
From source code atreflex_ui/components/base/checkbox.py:102:
- Built on Base UI Checkbox primitives
- High-level wrapper automatically creates root + indicator
- When label provided, wraps in Label element
- Default indicator is tick icon from HugeIcon library
- Fully keyboard accessible with Space key toggle