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

Index

Constructors

Properties

ariaLabelledby: string

Sets the aria-labelledby attribute for the control.

checked: boolean = false

The checked state of the control.

disabled: boolean = false

Disables the control.

indeterminate: boolean = false

Draws the checkbox in indeterminate state.

invalid: boolean = false

Controls the validity of the control.

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

The label position of the control.

name: string

The name attribute of the control.

required: boolean = false

Makes the control a required field.

value: string

The value attribute of the control.

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

Methods

  • blur(): void
  • click(): void
  • connectedCallback(): void
  • disconnectedCallback(): void
  • emitEvent<K, D>(type: K, eventInitDict?: CustomEventInit<D>): boolean
  • Type Parameters

    • K extends keyof IgcCheckboxEventMap

    • D extends boolean | void

    Parameters

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

    Returns boolean

  • focus(options?: FocusOptions): void
  • reportValidity(): boolean
  • setCustomValidity(message: string): 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