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

  • IgcButtonBaseComponent
    • IgcButtonComponent

Index

Constructors

Properties

disabled: boolean = false

Determines whether the button is disabled.

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

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

Determines the size of the component.

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

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

type: "button" | "reset" | "submit"

The type of the button. Defaults to undefined.

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

Sets the variant of the button.

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

Accessors

  • get ariaLabel(): string
  • set ariaLabel(value: string): void

Methods

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

    • K extends keyof IgcButtonEventMap

    • D extends void

    Parameters

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

    Returns boolean

  • focus(options?: FocusOptions): void