shadcn.io is an independent project built on shadcn/ui
A round avatar with no photo shows a user icon on the muted background. There are no initials and no image.
Use it for a guest or an account with no name and no picture. Initials are better once you know the name. A role can sit in a Badge beside it. In Vue, Ark UI does not choose the icon.
Installation
Anatomy
Usage
<Avatar>
<AvatarFallback><UserIcon aria-hidden="true" class="size-4" /></AvatarFallback>
</Avatar>FAQ
Why is there no photo?
This file has no AvatarImage. AvatarFallback is the whole face, and it holds a UserIcon at size-4.
Is the user icon announced?
The icon sets aria-hidden, and the fallback has no other text, so the avatar has no name. Add a visually hidden name next to the icon when nothing beside the avatar says who it is.
What color is the placeholder?
AvatarFallback uses the muted background and muted foreground from the avatar styles. The icon inherits that foreground. This file doesn't set a color.
How do I make the placeholder larger?
Set size on Avatar to sm, default, or lg. The icon stays size-4 until you change that class. The fallback fills the avatar.
API Reference
Avatar
No extra props in this demo. The rest is on the Avatar page.