Class IgcCheckboxComponent

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

Element

igc-checkbox

Slot

  • The checkbox label.

Fires

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

Fires

igcFocus - Emitted when the control gains focus.

Fires

igcBlur - Emitted when the control loses focus.

Csspart

base - The base wrapper of the checkbox.

Csspart

control - The checkbox control.

Csspart

label - The checkbox label.

Csspart

indicator - The checkbox icon.

Hierarchy

  • IgcCheckboxBaseComponent
    • IgcCheckboxComponent

Constructors

Properties

ariaLabelledby: string

Sets the aria-labelledby attribute for the control.

checked: boolean = false

The checked state of the control.

Attr

disabled: boolean = false

Disables the control.

Attr

indeterminate: boolean = false

Draws the checkbox in indeterminate state.

Attr

invalid: boolean = false

Controls the validity of the control.

Attr

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

The label position of the control.

Attr

label-position

name: string

The name attribute of the control.

Attr

required: boolean = false

Makes the control a required field.

Attr

value: string

The value attribute of the control.

Attr

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

Methods

  • Checks for validity of the control and emits the invalid event if it invalid.

    Returns boolean

  • Type Parameters

    • K extends keyof IgcCheckboxEventMap

    • D extends boolean | void

    Parameters

    • type: K
    • Optional eventInitDict: CustomEventInit<D>

    Returns boolean

  • Sets focus on the control.

    Parameters

    • Optional options: FocusOptions

    Returns void

  • Checks for validity of the control and shows the browser message if it invalid.

    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