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
Name | Description | Type | Default |
---|---|---|---|
icon | representation type to icon, more info on icon component | string / Component | — |
size | avatar size | number / large / default / small | default |
circle | avatar circle shape | boolean | false |
gradient | avatar fill with gradient | boolean | false |
name | avatar text | string | — |
color-id | avatar color identifier | string | — |
src | the source of the image for an image avatar | string | — |
src-set | native attribute srcset of image avatar | string | — |
alt | native attribute alt of image avatar | string | — |
Avatar Events
Name | Description | Type |
---|---|---|
error | trigger when image load error. | (e: Event) => void |
Avatar Slots
Name | Description |
---|---|
default | customize avatar content. |