docs/components/avatar
Sections
Components
Utilities
Forms
Hooks
Copy Markdown
Displays a user's profile image with fallback.
PreviewCode
VV
CN
VV
SA
PV
+2
CLIManual
pnpmbunnpmyarn
pnpm dlx shadcn@latest add @shark/avatar
Avatar
├── AvatarImage
└── AvatarFallback
AvatarGroup
├── AvatarGroupCount
└── Avatar
├── AvatarImage
├── AvatarFallback
└── AvatarBadge
import {
Avatar,
AvatarImage,
AvatarFallback
} from "@/components/ui/avatar";
<Avatar>
<AvatarImage src="https://github.com/vinihvc.png" />
<AvatarFallback>VV</AvatarFallback>
</Avatar>
PreviewCode
VV
PreviewCode
VV
PreviewCode
VV
PreviewCode
VV
SA
PV
IA
PreviewCode
VV
SA
PV
PreviewCode
VV
PreviewCode
PreviewCode
VV
SA
PV
IA
+5
PreviewCode
VV
SA
PV
IA
PreviewCode
VV
SA
PV
IA +5
PreviewCode
VV
CN
Use size-* to set the size of the avatar.
PreviewCode
VV
You can use breakpoint utilities to change the size at different screen sizes.
md:size-4 lg:size-8
Use rounded-* to set the radius of the avatar.
PreviewCode
VV
CN
SA
PV
You can use breakpoint utilities to change the radius at different screen sizes.
md:rounded-full lg:rounded-lg
Container for user or entity profile image. Supports sizes and fallback.
| Prop | Type | Default |
|---|---|---|
size | `"sm" | "md" |
className | string | - |
asChild | boolean | false |
Profile image. Shown when URL loads; fallback used on error.
| Prop | Type | Default |
|---|---|---|
className | string | - |
asChild | boolean | false |
Shown when the image fails to load or is loading. Often initials or icon.
| Prop | Type | Default |
|---|---|---|
className | string | - |
asChild | boolean | false |
Groups avatars with overlap and optional count badge.
| Prop | Type | Default |
|---|---|---|
className | string | - |
asChild | boolean | false |
Shows "+N" when more avatars exist than displayed.
| Prop | Type | Default |
|---|---|---|
className | string | - |
asChild | boolean | false |
Status or indicator badge overlaid on the avatar corner.
| Prop | Type | Default |
|---|---|---|
variant | `"default" | "success" |
className | string | - |
asChild | boolean | false |
For a complete list of props, see the Ark UI documentation.
[
Previous page
Autocomplete ](/docs/components/autocomplete)[
Next page
Badge ](/docs/components/badge)
On This Page
InstallationAnatomyUsageSizesSmallMediumLargeExamplesAvatar GroupBadgeBadge with IconFallback with IconAvatar Group CountAvatar Group Count IconAvatar with PopoverAvatar with Hover CardCustom SizeCustom RadiusAPI ReferenceAvatarAvatarImageAvatarFallbackAvatarGroupAvatarGroupCountAvatarBadge