Represents a clickable button, used to submit forms or anywhere in a document for accessible, standard button functionality.
- 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"disabled
Section titled "disabled"The disabled state of the component
disabled: boolean download
Section titled "download"Prompts to save the linked URL instead of navigating to it.
download: string The URL the button points to.
href: string The relationship of the linked URL. See https://developer.mozilla.org/en-US/docs/Web/HTML/Link_types
rel: string target
Section titled "target"Where to display the linked URL, as the name for a browsing context.
target: "_blank" | "_parent" | "_self" | "_top" The type of the button. Defaults to button.
type: "reset" | "submit" | "button" variant
Section titled "variant"Sets the variant of the button.
variant: ButtonVariant Accessors
Section titled "Accessors"Returns the HTMLFormElement associated with this element.
get form(): HTMLFormElement Returns HTMLFormElement
Methods
Section titled "Methods"Removes focus from the button.
blur(): void Returns void
click
Section titled "click"Simulates a mouse click on the element
click(): void Returns void
focus
Section titled "focus"Sets focus in the button.
focus(options: FocusOptions): void Parameters
- options:
FocusOptions