Class IgcButtonComponent

Represents a clickable button, used to submit forms or anywhere in a document for accessible, standard button functionality.

igc-button

  • Renders the label of the button.

prefix - Renders content before the label of the button.

suffix - Renders content after the label of the button.

base - The native button element of the igc-button component.

prefix - The prefix container of the igc-button component.

suffix - The suffix container of the igc-button component.

Hierarchy

Hierarchy

  • IgcButtonBaseComponent
    • IgcButtonComponent

Constructors

Properties

download?: string

Prompts to save the linked URL instead of navigating to it.

href?: string

The URL the button points to.

rel?: string

The relationship of the linked URL. See https://developer.mozilla.org/en-US/docs/Web/HTML/Link_types

target?: "_blank" | "_parent" | "_self" | "_top"

Where to display the linked URL, as the name for a browsing context.

type: "reset" | "submit" | "button" = 'button'

The type of the button. Defaults to button.

variant: ButtonVariant = 'contained'

Sets the variant of the button.

formAssociated: true = true
tagName: "igc-button" = 'igc-button'

Accessors

  • get form(): HTMLFormElement | null

    Returns the HTMLFormElement associated with this element.

    Returns HTMLFormElement | null

Methods

  • Type parameters

    Type Parameters

    • K extends string | number | symbol
    • M extends IgcButtonEventMap & HTMLElementEventMap

    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

    • K extends keyof IgcButtonEventMap
    • D extends unknown

    Parameters

    • type: K
    • eventInitDict: CustomEventInit<D>

    Returns boolean

  • Sets focus in the button.

    Parameters

    • options: FocusOptions

    Returns void

  • Type parameters

    Type Parameters

    • K extends string | number | symbol
    • M extends IgcButtonEventMap & HTMLElementEventMap

    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