Avatar

Avatars can be used to represent people or objects. It supports images, Icons, or characters.

Basic usage

Types

It supports images, Icons, or characters.

Fallback

fallback when image load error.

Avatar Attributes

NameDescriptionTypeDefault
iconrepresentation type to icon, more info on icon componentstring / Component
sizeavatar sizenumber / large / default / smalldefault
circleavatar circle shapebooleanfalse
gradientavatar fill with gradientbooleanfalse
nameavatar textstring
color-idavatar color identifierstring
srcthe source of the image for an image avatarstring
src-setnative attribute srcset of image avatarstring
altnative attribute alt of image avatarstring

Avatar Events

NameDescriptionType
errortrigger when image load error.(e: Event) => void

Avatar Slots

NameDescription
defaultcustomize avatar content.
Last Updated:
Contributors: Tam Mai