Similar to a checkbox, a switch controls the state of a single setting on or off.

Slots
default — The switch label.
CSS Parts
base — The base wrapper of the switch.
control — The switch input element.
thumb — The position indicator of the switch.
label — The switch label.

The checked state of the control.

checked: boolean

The label position of the control.

labelPosition: ToggleLabelPosition

The value attribute of the control.

value: string

Removes focus from the control.

blur(): void

Returns void

Simulates a click on the control.

click(): void

Returns void

Sets focus on the control.

focus(options: FocusOptions): void

Parameters

  • options: FocusOptions

Returns void

Emitted when the control's checked state changes.

onChange(args: CustomEvent<IgrCheckboxChangeEventArgs>): void

Parameters

Returns void