Components
- Accordion
- Action BarUpdated
- Alert Dialog
- Alert
- Announcement
- Aspect Ratio
- Autocomplete
- Avatar
- BadgeUpdated
- Bottom Navigation
- Breadcrumb
- Button Group
- Button
- CalendarUpdated
- CardUpdated
- Carousel
- Chart
- Checkbox
- Circular Progress
- Circular Slider
- Clipboard
- Collapsible
- Color Picker
- Combobox
- Command
- Context MenuUpdated
- Data List
- Date Picker
- DialogUpdated
- DrawerUpdated
- Editable
- FieldUpdated
- File Upload
- Float
- Floating Panel
- Frame
- Hint
- Hover Card
- Image Cropper
- Input Group
- Input OTP
- Input
- Item
- Kbd
- Link Overlay
- Listbox
- MarqueeUpdated
- Menu
- Native Select
- Number InputUpdated
- Pagination
- Popover
- Progress
- Prose
- QR Code
- Radio Group
- Rating
- Resizable
- Scroll Area
- Segment Group
- Select
- Separator
- Sheet
- Sidebar
- Signature Pad
- Skeleton
- Skip Nav
- Slider
- Spinner
- Status
- Steps
- Switch
- TableUpdated
- Tabs
- Textarea
- TimerUpdated
- ToastUpdated
- Toggle Group
- Toggle Tooltip
- Toggle
- Tooltip
- Tour
- Tree View
Hooks
VV
CN
VV
SA
PV+2
Installation#
pnpm dlx shadcn@latest add @shark/avatar
Anatomy#
Avatar ├── AvatarImage └── AvatarFallback AvatarGroup ├── AvatarGroupCount └── Avatar ├── AvatarImage ├── AvatarFallback └── AvatarBadge
Usage#
import { Avatar, AvatarImage, AvatarFallback } from "@/components/ui/avatar";
<Avatar> <AvatarImage src="https://github.com/vinihvc.png" /> <AvatarFallback>VV</AvatarFallback> </Avatar>
Sizes#
Small#
VVMedium#
VVLarge#
VVExamples#
Avatar Group#
VV
SA
PV
IABadge#
VV
SA
PVBadge with Icon#
VVFallback with Icon#
Avatar Group Count#
VV
SA
PV
IA+5
Avatar Group Count Icon#
VV
SA
PV
IAAvatar with Popover#
VV
SA
PV
IAAvatar with Hover Card#
Custom Size#
Use size-* to set the size of the avatar.
VVYou can use breakpoint utilities to change the size at different screen sizes.
md:size-4 lg:size-8
Custom Radius#
Use rounded-* to set the radius of the avatar.
VV
CN
SA
PVYou can use breakpoint utilities to change the radius at different screen sizes.
md:rounded-full lg:rounded-lg
API Reference#
Avatar#
Container for user or entity profile image. Supports sizes and fallback.
| Prop | Type | Default |
|---|---|---|
size | "sm" | "md" | "lg" | "md" |
className | string | - |
asChild | boolean | false |
AvatarImage#
Profile image. Shown when URL loads; fallback used on error.
| Prop | Type | Default |
|---|---|---|
className | string | - |
asChild | boolean | false |
AvatarFallback#
Shown when the image fails to load or is loading. Often initials or icon.
| Prop | Type | Default |
|---|---|---|
className | string | - |
asChild | boolean | false |
AvatarGroup#
Groups avatars with overlap and optional count badge.
| Prop | Type | Default |
|---|---|---|
className | string | - |
asChild | boolean | false |
AvatarGroupCount#
Shows "+N" when more avatars exist than displayed.
| Prop | Type | Default |
|---|---|---|
className | string | - |
asChild | boolean | false |
AvatarBadge#
Status or indicator badge overlaid on the avatar corner.
| Prop | Type | Default |
|---|---|---|
variant | "default" | "success" | "info" | "warning" | "destructive" | "default" |
className | string | - |
asChild | boolean | false |
For a complete list of props, see the Ark UI documentation.
On This Page