Skip to main content

Avatar

<gstock-avatar> | GstockAvatar

API

Propiedades

Nombre Descripción Reflects Tipo Por defecto
image The image source to use for the avatar. string ''
initials Initials to use as a fallback when no image is available (1–2 characters max recommended). string ''
label A label to use to describe the avatar to assistive devices. string ''
loading Indicates how the browser should load the image. 'eager' | 'lazy' 'eager'
rounded Change the avatar shape to a rounded appearance. Reflects boolean false
size The size of the avatar. Reflects 'small' | 'medium' | 'large' 'medium'
color The optional color of the avatar. Reflects 'primary' | 'secondary' | undefined -
updateComplete

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

Aprende más sobre atributos y propiedades .

Slots

Nombre Descripción
icon The default icon to use when no image or initials are present. Works best with <gstock-icon>.

Aprende más sobre slots .

Partes

Nombre Descripción
base The component’s base wrapper.
icon The container that wraps the avatar’s icon.
initials The container that wraps the avatar’s initials.
image The avatar image. Only shown when the image attribute is set.

Aprende más sobre partes CSS .

Dependencias

Este componente importa automáticamente las siguientes dependencias.