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

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.

Accessors

  • set required(value: boolean): void

    When set, makes the component a required field for validation.

    false
    

    Parameters

    • value: boolean

    Returns void

  • 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

  • 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