avatar

Avatar

A person's picture with initials or an icon as fallback and an optional status badge; a group overlaps several and shows how many more there are.

States: Default

Parts

PartFileDoes
AvatarAvatar.vueGroups the image, fallback and badge of an avatar.
AvatarBadgeAvatarBadge.vueShows a small status marker on the corner of the avatar.
AvatarFallbackAvatarFallback.vueShows initials or an icon when the avatar image is missing or fails to load.
AvatarGroupAvatarGroup.vueStacks several avatars in an overlapping row.
AvatarGroupCountAvatarGroupCount.vueShows how many more avatars the group holds than it displays.
AvatarImageAvatarImage.vueShows the picture of the avatar.

Anatomy

<AvatarGroup>
  <Avatar>
    <AvatarImage />
    <AvatarFallback />
    <AvatarBadge />
  </Avatar>
  <AvatarGroupCount />
</AvatarGroup>

Styling

PartRecipe
Avataravatar
Avataravatar-ring
AvatarBadgeavatar-badge
AvatarFallbackavatar-fallback
AvatarGroupavatar-group
AvatarGroupCountavatar-group-count
AvatarImageavatar-image

Install

Writes 8 files into components/ui/avatar/. For agents, npx @frontic/ui docs avatar prints this reference as markdown; the MCP server serves the same.

npm packages
@vueuse/core
class-variance-authority
reka-ui

API reference

Avatar Avatar.vue

Groups the image, fallback and badge of an avatar. Renders a <span>.

PropTypeDefault
classClassValue—
sizeAvatarSize—
Data attributeValues
data-size'md' | 'sm' | 'lg'
Recipe avatarSets
base: avatar 5 properties
size: sm 1 property
size: mddefault 1 property
size: lg 1 property
Recipe avatar-ringSets
base: avatar-ring 2 properties

AvatarBadge AvatarBadge.vue

AvatarFallback AvatarFallback.vue

AvatarGroup AvatarGroup.vue

AvatarGroupCount AvatarGroupCount.vue

AvatarImage AvatarImage.vue

Example