Skip to main content

Checkbox API

Properties
NameTypeDefaultDescription
labelstringVisible label text next to the checkbox.
sr-labelstringScreen-reader-only label for accessibility.
data-idstringThe id applied to the internal input element.
namestringName used when the element is submitted in a form.
valuestringValue of the input.
checkedbooleanWhether the checkbox is checked.
indeterminatebooleanPuts the checkbox in an indeterminate (mixed) state.
disabledbooleanMakes the checkbox non-interactive.
helperstringTooltip 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