Avatars with fallbacks, status badges, grouped stacks, and optional tooltips.
npx shadcn@latest add @iconiq/avatarimport {
Avatar,
AvatarBadge,
AvatarFallback,
AvatarGroup,
AvatarGroupCount,
AvatarImage,
} from "@/components/ui/avatar";
export function AvatarDemo() {
return (
<div className="flex flex-wrap items-center gap-8">
<Avatar aria-label="shadcn/ui, online" tooltip="Online now">
<AvatarImage src="/assets/shadcn.jpg" alt="shadcn/ui" />
<AvatarFallback>SU</AvatarFallback>
<AvatarBadge variant="online" />
</Avatar>
<AvatarGroup>
<Avatar size="default">
<AvatarImage src="/assets/av1.png" alt="Avatar 1" />
<AvatarFallback>A1</AvatarFallback>
</Avatar>
<Avatar size="default">
<AvatarImage src="/assets/av3.png" alt="Avatar 3" />
<AvatarFallback>A3</AvatarFallback>
</Avatar>
<Avatar size="default">
<AvatarImage src="/assets/av2.png" alt="Avatar 2" />
<AvatarFallback>A2</AvatarFallback>
</Avatar>
<AvatarGroupCount>+3</AvatarGroupCount>
</AvatarGroup>
</div>
);
}childrenCompose AvatarImage, AvatarFallback, and an optional AvatarBadge inside the root.
Type ReactNode
sizeControls the root size and drives badge/fallback sizing through data-size selectors.
Type "default" | "sm" | "lg"·Default "default"
tooltipOptional short label shown in the Iconiq tooltip surface when the entire avatar is hovered or focused.
Type string
tooltipSidePreferred side for the avatar tooltip bubble. The default collision order is right, left, top, then bottom.
Type "top" | "bottom" | "left" | "right"·Default "right"
tooltipDelayDelay in seconds before the avatar tooltip opens.
Type number·Default 0.15
tooltipClassNameMerged onto the tooltip bubble when the avatar tooltip is enabled.
Type string
nameOptional display name used by AvatarFallback to auto-generate initials when children are omitted.
Type string
asChildMerge avatar props onto the child element via Radix Slot, useful for link or button triggers.
Type boolean·Default false
aria-labelAccessible name for the avatar. Defaults to the tooltip string when tooltip is set.
Type string
classNameMerged onto the Base UI avatar root. Use it for local radius, ring, or size overrides.
Type string
srcImage URL passed to the underlying Base UI image primitive.
Type string
altAccessible text for the image. Pass an empty string only when the avatar is decorative.
Type string
classNameMerged with the full-size rounded image classes.
Type string
childrenInitials, icon, or other compact fallback content centered inside the avatar.
Type ReactNode
classNameMerged with the muted circular fallback classes.
Type string
variantPreset status color mapped to theme-friendly green, muted, destructive, and amber tokens.
Type "online" | "offline" | "busy" | "away"·Default "online"
aria-labelAccessible status label. Defaults to the tooltip string or the variant label such as Online or Busy.
Type string
childrenOptional icon or status mark. Icons scale down on small avatars instead of disappearing.
Type ReactNode
tooltipOptional short label shown in the Iconiq tooltip surface when only the badge should be the trigger.
Type string
tooltipSidePreferred side for the tooltip bubble. The default collision order is right, left, top, then bottom.
Type "top" | "bottom" | "left" | "right"·Default "right"
tooltipDelayDelay in seconds before the tooltip opens.
Type number·Default 0.15
tooltipClassNameMerged onto the tooltip bubble when the badge tooltip is enabled.
Type string
classNameMerged with the green status badge background, foreground, and ring classes.
Type string
childrenAvatar and AvatarGroupCount children rendered in an overlapping row.
Type ReactNode
classNameMerged with the negative-space group classes and child avatar rings.
Type string
childrenCount label or icon shown after the visible avatars.
Type ReactNode
classNameMerged with the muted circular count chip classes.
Type string
Install the exact registry entry shown on the right when you want the component file and its declared runtime dependencies together.
Dependencies: @base-ui/react, @radix-ui/react-slot, motion.
Contact
Additionally, if you find any bug or issue, feel free to raise an issue.
Assigned toSUon this release.