Usage and anatomy

Avatar displays a person's image with a fallback for missing or failed images. Compose Avatar.Image and either Avatar.TextFallback or Avatar.IconFallback inside Avatar.Root.

import * as Avatar from "@acme/ui/avatar"
<Avatar.Root>
<Avatar.Image src="/avatars/ada.png" alt="Ada Lovelace" />
<Avatar.TextFallback>AL</Avatar.TextFallback>
</Avatar.Root>

Text fallbacks should use short recognizable initials. The fallback automatically replaces the image when it cannot load, and inherits the root's size and shape.

Avatars - Rounded

Avatars - Squared

Avatars - Stacked

Avatars - Fallbacks

Avatars - With text

API reference

Avatar.Root
PropTypeDefault
sizexxs | xs | sm | md | lg | xl | xxlmd
variantrounded | squaredrounded

Avatar.Image accepts Radix Avatar image props such as src and alt. Avatar.TextFallback accepts Radix fallback props, including delayMs; Avatar.IconFallback renders the built-in profile illustration.

PlumeUI - Build beautiful React applications faster