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.
Properties
Section titled "Properties"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
Optional href
Section titled "href"Inherited from: IgcButtonBaseComponent
The URL the button points to.
href: string Defined in src/components/button/button-base.ts:49
Optional rel
Section titled "rel"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
Optional target
Section titled "target"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
variant
Section titled "variant"Sets the variant of the button.
variant: ButtonVariant = 'contained' Defined in src/components/button/button.ts:40
Accessors
Section titled "Accessors"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
Methods
Section titled "Methods"Inherited from: IgcButtonBaseComponent
Removes focus from the button.
blur(): void Defined in src/components/button/button-base.ts:107
Returns void
click
Section titled "click"Inherited from: IgcButtonBaseComponent
Simulates a mouse click on the element
click(): void Defined in src/components/button/button-base.ts:101
Returns void
focus
Section titled "focus"Inherited from: IgcButtonBaseComponent
Sets focus in the button.
focus(options: FocusOptions): void Defined in src/components/button/button-base.ts:96
Parameters
- options:
FocusOptions