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

Element
igc-button
Slots
default — Renders the label of the button.
prefix — Renders content before the label of the button.
suffix — Renders content after the label of the button.
CSS Parts
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.

Optional download

Section titled "download"

Inherited from: IgcButtonBaseComponent

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

download: string

Defined in src/components/button/button-base.ts:56

Inherited from: IgcButtonBaseComponent

The URL the button points to.

href: string

Defined in src/components/button/button-base.ts:49

Inherited from: IgcButtonBaseComponent

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

rel: string

Defined in src/components/button/button-base.ts:71

Inherited from: IgcButtonBaseComponent

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

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

Defined in src/components/button/button-base.ts:63

Inherited from: IgcButtonBaseComponent

The type of the button. Defaults to button.

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

Defined in src/components/button/button-base.ts:42

Sets the variant of the button.

variant: ButtonVariant = 'contained'

Defined in src/components/button/button.ts:40

Inherited from: IgcButtonBaseComponent

Returns the HTMLFormElement associated with this element.

get form(): HTMLFormElement | null

Defined in src/components/button/button-base.ts:90

Returns HTMLFormElement | null

Inherited from: IgcButtonBaseComponent

Removes focus from the button.

blur(): void

Defined in src/components/button/button-base.ts:107

Returns void

Inherited from: IgcButtonBaseComponent

Simulates a mouse click on the element

click(): void

Defined in src/components/button/button-base.ts:101

Returns void

Inherited from: IgcButtonBaseComponent

Sets focus in the button.

focus(options: FocusOptions): void

Defined in src/components/button/button-base.ts:96

Parameters

  • options: FocusOptions

Returns void