Vivid API

Avatar

Avatars are used to represent a user or a system entity. They can be used to represent a person, a group of people, or an object.

Usage

import { VAvatar, VIcon } from '@vonage/vivid-api-vue';
import { registerAvatar } from '@vonage/vivid-api';
registerAvatar('your-prefix');

Slots

Icon

Use the icon slot to add an icon to the avatar.

To maintain accessibility, always provide a label property for the slotted icon — read more in the Icon component guidelines.

Graphic

Use the graphic slot to set any graphic media (e.g. image or SVG) as the avatar content.

API Reference

Properties

PropertyTypeDefaultDescription
appearance'filled' | 'outlined' | 'duotone' | 'subtle'Sets the element's appearance
clickablebooleanIndicates whether avatar should be a clickable <button> element.
connotation'accent' | 'cta'Sets the element's connotation
downloadstringPrompts the user to save the linked URL. See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a | <a> element for more information.
hrefstringThe URL the hyperlink references. See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a | <a> element for more information.
hreflangstringHints at the language of the referenced resource. See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a | <a> element for more information.
initialsstringSets the initials on the Avatar
pingstringSee https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a | <a> element for more information.
referrerpolicystringSee https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a | <a> element for more information.
relstringSee https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a | <a> element for more information.
shape'rounded' | 'pill'Sets the element's shape
size'condensed' | 'normal' | 'expanded'Sets the element's size
target'_self' | '_blank' | '_parent' | '_top'See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a | <a> element for more information.
typestringSee https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a | <a> element for more information.
PropertyTypeDefaultDescription
appearance'filled' | 'outlined' | 'duotone' | 'subtle'Sets the element's appearance
clickablebooleanIndicates whether avatar should be a clickable <button> element.
connotation'accent' | 'cta'Sets the element's connotation
downloadstringPrompts the user to save the linked URL. See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a | <a> element for more information.
hrefstringThe URL the hyperlink references. See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a | <a> element for more information.
hreflangstringHints at the language of the referenced resource. See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a | <a> element for more information.
initialsstringSets the initials on the Avatar
pingstringSee https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a | <a> element for more information.
referrerpolicystringSee https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a | <a> element for more information.
relstringSee https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a | <a> element for more information.
shape'rounded' | 'pill'Sets the element's shape
size'condensed' | 'normal' | 'expanded'Sets the element's size
target'_self' | '_blank' | '_parent' | '_top'See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a | <a> element for more information.
typestringSee https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a | <a> element for more information.

Slots

NameDescription
graphicAssign nodes to the graphic slot to set a graphic media of any kind (e.g. image, illustration etc).
iconThe preferred way to add an icon to the component.
NameDescription
graphicAssign nodes to the graphic slot to set a graphic media of any kind (e.g. image, illustration etc).
iconThe preferred way to add an icon to the component.