Class IgcCheckboxComponent

A check box allowing single values to be selected/deselected.

igc-checkbox

  • The checkbox label.

igcChange - Emitted when the control's checked state changes.

igcFocus - Emitted when the control gains focus.

igcBlur - Emitted when the control loses focus.

base - The base wrapper of the checkbox.

control - The checkbox control.

label - The checkbox label.

indicator - The checkbox icon.

Hierarchy

Hierarchy

  • IgcCheckboxBaseComponent
    • IgcCheckboxComponent

Other

disabled: boolean

The disabled state of the component

[disabled=false]

indeterminate: boolean = false

Draws the checkbox in indeterminate state.

invalid: boolean

Control the validity of the control.

labelPosition: "after" | "before" = 'after'

The label position of the control.

label-position

name: string

The name attribute of the control.

required: boolean

Makes the control a required field in a form context.

  • get validity(): ValidityState
  • Returns a ValidityState object which represents the different validity states the element can be in, with respect to constraint validation.

    Returns ValidityState

  • get willValidate(): boolean
  • A boolean value which returns true if the element is a submittable element that is a candidate for constraint validation.

    Returns boolean

  • Sets a custom validation message for the control. As long as message is not empty, the control is considered invalid.

    Parameters

    • message: string

    Returns void

lifecycle

  • Invoked when the component is added to the document's DOM.

    In connectedCallback() you should setup tasks that should only occur when the element is connected to the document. The most common of these is adding event listeners to nodes external to the element, like a keydown event handler added to the window.

    connectedCallback() {
    super.connectedCallback();
    addEventListener('keydown', this._handleKeydown);
    }

    Typically, anything done in connectedCallback() should be undone when the element is disconnected, in disconnectedCallback().

    Returns void