Data display / Avatar

Data display

Avatar

Initials avatars in four sizes.

import { EcoAvatar } from "vue-ecosphere"

Sizes

Extra small, small, default and large.

Initials

Word initials, not the first two letters: Alex Jordan is AJ, Analytics warehouse AW. A decorative avatar beside a name already on screen is aria-hidden; one that is itself a control needs a label.

API

NameTypeDefaultDescription
namestring—Full name. Initials come from its first and last words; the default slot overrides them.
size"xs" | "sm" | "md" | "lg""md"Four sizes; md is the 36px default.
srcstring—Photo URL, shown instead of the initials.
labelstring—Accessible name. Omit when the name is already on screen (the avatar is then aria-hidden).