shadcn.io is an independent project built on shadcn/ui
An avatar with square corners and no photo shows a user icon on the muted background. There are no initials and no image.
Use it for an app, a workspace, or a service that has no logo yet. A person with no photo still fits a round Avatar. In React, Ark UI does not pick a logo.
Installation
Anatomy
Usage
<Avatar className="rounded-lg after:rounded-lg">
<AvatarFallback className="rounded-lg">
<UserIcon aria-hidden="true" className="size-4" />
</AvatarFallback>
</Avatar>FAQ
How is this placeholder squared off?
rounded-lg is on Avatar and on AvatarFallback, and after:rounded-lg is on Avatar so the border matches. There is no image in this file.
What does the fallback contain?
A UserIcon at size-4. AvatarFallback centers it and fills the avatar.
Is the icon announced?
It sets aria-hidden, and there is no text, so the avatar has no accessible name. Add a visually hidden name beside the icon when the avatar stands alone.
Where does the gray background come from?
The avatar styles. AvatarFallback uses the muted background and muted foreground. This file doesn't pass a color class.
API Reference
Avatar
No extra props in this demo. The rest is on the Avatar page.