Class IgcButtonComponent

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

Element

igc-button

Slot

  • Renders the label of the button.

Slot

prefix - Renders content before the label of the button.

Slot

suffix - Renders content after the label of the button.

Fires

igcFocus - Emitted when the button gains focus.

Fires

igcBlur - Emitted when the button loses focus.

Csspart

base - The native button element.

Csspart

prefix - The prefix container.

Csspart

suffix - The suffix container.

Hierarchy

Hierarchy

  • IgcButtonBaseComponent
    • IgcButtonComponent

Constructors

Properties

download: string

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

Attr

href: string

The URL the button points to.

Attr

rel: string

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

Attr

size: "small" | "medium" | "large"

Determines the size of the component.

Attr

Deprecated

since v4.5.0. Use the --ig-size CSS custom property instead.

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

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

Attr

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

The type of the button. Defaults to button.

Attr

variant: "flat" | "outlined" | "contained" | "fab" = 'contained'

Sets the variant of the button.

Attr

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

Accessors

  • get form(): null | HTMLFormElement
  • Returns the HTMLFormElement associated with this element.

    Returns null | HTMLFormElement

Methods

  • Type parameters

    Type Parameters

    • K extends keyof IgcButtonEventMap
    • D extends void

    Parameters

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

    Returns boolean