Class IgcCheckboxComponent

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

igc-checkbox

  • 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).

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

base - The base wrapper of the checkbox.

control - The checkbox input element.

label - The checkbox label.

indicator - The checkbox indicator icon.

Hierarchy

Hierarchy

  • IgcCheckboxBaseComponent
    • IgcCheckboxComponent

Constructors

Properties

disabled: boolean

The disabled state of the component.

false
indeterminate: boolean = false

Draws the checkbox in indeterminate state.

invalid: boolean

Sets the control into invalid state (visual state only).

false
labelPosition: ToggleLabelPosition = 'after'

The label position of the control.

label-position

name: string

The name attribute of the control.

tagName: "igc-checkbox" = 'igc-checkbox'

Accessors

  • 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

Methods

  • Type parameters

    Type Parameters

    Parameters

    • type: K
    • listener: (this: HTMLElement, ev: M[K]) => any
    • options: boolean | AddEventListenerOptions

    Returns void

  • Parameters

    • type: string
    • listener: EventListenerOrEventListenerObject
    • options: boolean | AddEventListenerOptions

    Returns void

  • Type parameters

    Type Parameters

    • K extends keyof HTMLElementEventMap

    Parameters

    • type: K
    • listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any
    • options: boolean | AddEventListenerOptions

    Returns void

  • Type parameters

    Type Parameters

    Parameters

    • type: K
    • listener: (this: HTMLElement, ev: M[K]) => any
    • options: boolean | EventListenerOptions

    Returns void

  • Parameters

    • type: string
    • listener: EventListenerOrEventListenerObject
    • options: boolean | EventListenerOptions

    Returns void

  • Type parameters

    Type Parameters

    • K extends keyof HTMLElementEventMap

    Parameters

    • type: K
    • listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any
    • options: boolean | EventListenerOptions

    Returns void

  • 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