Avatar
Avatars can be used to represent people or objects. It supports images, Icons, or characters.
Basic Usage
Use shape and size prop to set avatar's shape and size.
Types
It supports images, Icons, or characters.
Fallback
fallback when image load error.
Fit Container
Set how the image fit its container for an image avatar, same as object-fit.
Avatar Group 2.13.1
Displayed as a avatar group.
Use tag <el-avatar-group> to group your avatars.
default





use collapse-avatars
+ 4use collapse-class and collapse-style
+ 4use max-collapse-avatars


+ 2use collapse-avatars-tooltip


+ 2Avatar API
Avatar Attributes
| Name | Description | Type | Default |
|---|---|---|---|
| icon | representation type to icon, more info on icon component. | string / Component | — |
| size | avatar size. | number / enum | — |
| shape | avatar shape. | enum | — |
| 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 | — |
| fit | set how the image fit its container for an image avatar. | enum | cover |
Avatar Events
| Name | Description | Type |
|---|---|---|
| error | trigger when image load error. | Function |
Avatar Slots
| Name | Description |
|---|---|
| default | customize avatar content. |
AvatarGroup API 2.13.1
AvatarGroup Attributes
| Name | Description | Type | Default |
|---|---|---|---|
| size | control the size of avatars in this avatar-group | number / enum | — |
| shape | control the shape of avatars in this avatar-group | enum | — |
| collapse-avatars | whether to collapse avatars | boolean | false |
| collapse-avatars-tooltip | whether show all collapsed avatars when mouse hover text of the collapse-avatar. To use this, collapse-avatars must be true | boolean | false |
| max-collapse-avatars | the max avatars number to be shown. To use this, collapse-avatars must be true | number | 1 |
| effect | tooltip theme, built-in theme: dark / light | enum / string | light |
| placement | placement of tooltip | enum | top |
| popper-class | custom class name for tooltip | string | '' |
| popper-style | custom style for tooltip | string / object | — |
| collapse-class | custom class name for the collapse-avatar | string | '' |
| collapse-style | custom style for the collapse-avatar | string / object | — |


