Skip to main content

Icon

<gstock-icon> | GstockIcon

API

Propiedades

Nombre Descripción Reflects Tipo Por defecto
name The name of the icon to draw. Available names depend on the icon library being used. Reflects 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 -
label An alternate description to use for assistive devices. If omitted, the icon will be considered presentational and ignored by assistive devices. string ''
library The name of a registered custom icon library. Reflects string 'default'
size The size of the icon. Reflects 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge' 'medium'
updateComplete

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

Aprende más sobre atributos y propiedades .

Eventos

Nombre React Event Descripción Event Detail
gstock-load-event onGstockLoadEvent Emitted when the icon has loaded. -
gstock-error-event onGstockErrorEvent Emitted when the icon fails to load due to an error. -

Aprende más sobre eventos .

Partes

Nombre Descripción
svg The internal SVG element.
use The element generated when using spriteSheet: true

Aprende más sobre partes CSS .