Basic Usage
Checked State
Multiple Checkboxes
With Actions
Theon_change parameter runs actions when the checkbox is toggled. $event is true when checked, false when unchecked:
With Disabled State
Reading the Value
Use.rx to get a reactive reference to the checkbox’s boolean state. The .then() pipe converts true/false into display-friendly strings:
Toggle the checkbox and the input updates to reflect the current state.
API Reference
Checkbox Parameters
Label text displayed next to the checkbox.
Whether the checkbox is initially checked.
State key for the checkbox’s checked state. Auto-generated if not provided. Use
.rx to reference the checkbox’s boolean value in other components.Whether the checkbox is non-interactive.
Whether the checkbox is required for form submission.
Action(s) to execute when toggled.
$event is true when checked, false when unchecked.Additional Tailwind CSS classes appended to the component’s built-in styles.
Protocol Reference
Checkbox