Skip to main content

Checkbox API

Properties
NameTypeDefaultDescription
labelstring—Visible label text next to the checkbox.
sr-labelstring—Screen-reader-only label for accessibility.
data-idstring—The id applied to the internal input element.
namestring—Name used when the element is submitted in a form.
valuestring—Value of the input.
checkedboolean—Whether the checkbox is checked.
indeterminateboolean—Puts the checkbox in an indeterminate (mixed) state.
disabledboolean—Makes the checkbox non-interactive.
helperstring—Tooltip text shown next to the label as a helper hint.
Events
EventDescriptionReturns
changeFires whenever the checked state changes via click or keyboard.Change event
clickFires when the input or label is clicked.Click event