Skip to content

Checkbox

Boolean form control (checked/unchecked) with optional indeterminate state, label, and validation.

HTML tag: c-e703e41124a834f24aa86d3268c8f00ad

  • boolean yes/no or on/off field
  • accept terms or enable feature toggle
  • single true/false (not one-of-many)
PropTypeDefaultDescription
valueBoolean
indeterminateBoolean
requiredBoolean
disabledBoolean
labelString
readonlyBoolean
helper_textString
error_textString
statusStringdefault
nameString
aria_labelString
aria_describedbyString
sizeStringmd
densityStringcomfortable
toneStringneutral
label_positionStringinline
readonly_tooltipString
  • Bind .value as Boolean.
  • Use input-changed for live toggles; value-committed when the value is finalized; validated after validate().
  • Use ab-radio-group when choosing one of several string options, not ab-checkbox.
EventDetail
input-changedvalue: Boolean
validatedvalid: Boolean, errors: Array
value-committedvalue: Boolean
focus
blur
SignatureDescription
focus()
blur()
toggle()
setValue(value: Boolean, options: Object)
setIndeterminate(indeterminate: Boolean)
validate()

Do not use for multi-option single choice (ab-radio-group or ab-select). Do not use for text entry (ab-input).

<c-e703e41124a834f24aa86d3268c8f00ad .label=${'Accept terms'} .value=${accepted} .required=${true} @input-changed=${e => accepted = e.detail.value}></c-e703e41124a834f24aa86d3268c8f00ad>