A check box allowing single values to be selected/deselected.
- Slots
-
default— The checkbox label. -
helper-text— Renders content below the input. -
value-missing— Renders content when the required validation fails. -
custom-error— Renders content when setCustomValidity(message) is set. -
invalid— Renders content when the component is in invalid state (validity.valid = false).
- CSS Parts
-
base— The base wrapper of the checkbox. -
control— The box of the checkbox. It holds the indicator. -
label— The checkbox label. -
indicator— The checkbox indicator icon. -
checked— Added to the base, control, label and indicator parts when the checkbox is checked. -
focused— Added to the base part when the checkbox has keyboard focus.
Properties
Section titled "Properties"indeterminate
Section titled "indeterminate"Whether the checkbox is in the indeterminate state. A user click clears it.
indeterminate: boolean labelPosition
Section titled "labelPosition"The label position of the control.
labelPosition: ToggleLabelPosition value
Section titled "value"The value of the control, submitted when the control is checked.
value: string Methods
Section titled "Methods"Removes focus from the control.
blur(): void Returns void
click
Section titled "click"Simulates a click on the control.
click(): void Returns void
focus
Section titled "focus"Sets focus on the control.
focus(options: FocusOptions): void Parameters
- options:
FocusOptions
Returns void
Events
Section titled "Events"onChange
Section titled "onChange"Emitted when the checked state of the control changes by user interaction.
onChange(args: CustomEvent<IgrCheckboxChangeEventArgs>): void