Skip to main content
Checkboxes let users select one or more options from a set.

Basic Usage

Checked State

Multiple Checkboxes

With Disabled State

API Reference

Checkbox Parameters

label
str | None
default:"None"
Label text displayed next to the checkbox.
checked
bool
default:"False"
Whether the checkbox is initially checked.
name
str | None
default:"None"
Form field name for submission.
value
str | None
default:"None"
Form value when checked.
disabled
bool
default:"False"
Whether the checkbox is non-interactive.
required
bool
default:"False"
Whether the checkbox is required for form submission.
css_class
str | None
default:"None"
Additional Tailwind CSS classes appended to the component’s built-in styles.

Protocol Reference

Checkbox
{
  "type": "Checkbox",
  "label?": "string",
  "checked?": false,
  "name?": "string",
  "value?": "string",
  "disabled?": false,
  "required?": false,
  "onChange?": "Action | Action[]",
  "cssClass?": "string"
}
For the complete protocol schema, see Checkbox.