Media
Avatar
A face, initials or an icon in a fixed box, in three sizes and with an optional badge; AvatarGroup overlaps a row of them.
WAI-ARIA tested
Import
main.ts
import { Avatar } from '@vitral/vue';Label, icon and image
ALGH
Sizes
SLXL
Group
The group is a list named “Reviewers”; the last avatar counts the rest.
ALGHKJMR+5
With a badge
API
Read from packages/vue/src/components/Avatar/types.ts, so it says what the component actually accepts.
Props
| Name | Type | Description |
|---|---|---|
| label | string | Initials, or any short text. Ignored when `image` is set. |
| image | string | An image source. It fills the box and is cropped to it. |
| alt | string | The image's alternative text. Empty, the default, marks it decorative, which it is when a name sits beside it. |
| icon | IconProp | — |
| size | AvatarSize | — |
| shape | 'square' | 'circle' | `'square'` (the default) or `'circle'`. |
Plus pt, dt and unstyled from BaseProps, see pass-through and unstyled mode.
Slots
| Name | Slot props | Description |
|---|---|---|
| default | — | — |