Checkbox
An easily stylable checkbox component.
Features
- Tri-state support (checked, unchecked, indeterminate)
- Syncs with native form elements for proper form submission
- Works with Field component for form integration
- Full keyboard support
Installation
typo3 ui:add checkbox
Please copy the files manually from GitHub into your project.
Read more about installing Components and Primitives.
Examples
Default Checked
Set the checkbox to be checked by default.
Indeterminate State
Use the indeterminate state for "select all" checkboxes or partial selections.
Disabled
Prevent interaction with the checkbox.
Anatomy
<primitives:checkbox.root>
<primitives:checkbox.control>
<primitives:checkbox.indicator />
</primitives:checkbox.control>
<primitives:checkbox.label />
<primitives:checkbox.hiddenInput />
</primitives:checkbox.root>