Skip to main content

Header Item

<gstock-header-item> | GstockHeaderItem

API

Properties

Name Description Reflects Type Default
disabled Disables the button. Reflects boolean false
download Tells the browser to download the linked file as this filename. Only used when href is set. string | undefined -
fixed Indicate if the item is fixed. Util for disable the iteration, for example when the item is a single icon. Reflects boolean false
href When set, the underlying button will be rendered as an <a> with this href instead of a <button>. string | undefined -
label A description that gets read by assistive devices. For optimal accessibility, you should always include a label that describes what the icon button does. string -
hideXlarge
hide-xlarge
Hides in the xlarge breakpoint. boolean false
hideLarge
hide-large
Hides in the large breakpoint. boolean false
hideMedium
hide-medium
Hides in the medium breakpoint. boolean false
hideSmall
hide-small
Hides in the small breakpoint. boolean false
hideXsmall
hide-xsmall
Hides in the xsmall breakpoint. boolean false
icon The icon name of a registered custom icon library. string | undefined -
src An external URL of an SVG file. Be sure you trust the content you are including, as it will be executed as code and can result in XSS attacks. string | undefined -
target Tells the browser where to open the link. Only used when href is set. '_blank' | '_parent' | '_self' | '_top' | undefined -
updateComplete

A read-only promise that resolves when the component has finished updating.

Learn more about attributes and properties .

Events

Name React Event Description Event Detail
gstock-blur-event onGstockBlurEvent Emitted when the icon button loses focus. -
gstock-focus-event onGstockFocusEvent Emitted when the icon button gains focus. -

Learn more about events .

Slots

Name Description
default The icon button’s content.

Learn more about slots .

Methods

Name Description
click( ) Simulates a click on the icon button.
focus(
options: FocusOptions
)
Sets focus on the icon button.
blur( ) Removes focus from the icon button.

Learn more about methods .

CSS Parts

Name Description
base The component’s base wrapper.

Learn more about CSS parts .

Dependencies

This component automatically imports the following dependencies.