shadcn.io is not affiliated with official shadcn/ui
Avatar examples · Square
Avatar with Placeholder Icon (Square) for React
A square avatar with no picture that shows a user icon as the placeholder.
A square placeholder for something without a picture, such as a workspace, an app or a service. This React avatar has no image: AvatarFallback fills the rounded-lg square with a user icon on the muted background. Use it in app directories, integration lists and workspace pickers until a logo is set.
Preview
Installation
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.
Related
- Avatar with Placeholder Initials (Square)A square avatar with no picture that
- Avatar with Placeholder Icon (Standard)A round avatar with no picture that shows
- Avatar SquareA square avatar with a profile picture
- Avatar with Count Indicator (Square)A square avatar with a red count of
- Avatar with Offline Indicator (Square)A square avatar with a gray dot at the
- Avatar with Online Indicator (Square)A square avatar with a green dot at the