Avatar
Image with initials fallback on error, three sizes and online/away/busy/offline dots.
online
busyaway
offline
offline- +2 more
import { Bot } from "lucide-react";import { Avatar } from "@/components/ui/avatar";export function User() { return ( <Avatar src="/jane.png" alt="Jane Doe" status="online" size="lg" fallback={<Bot />} /> );}<Avatar>
alt*stringPerson's name: used for alt text and initials fallback.
fallbackReactNodeOverrides initials (text or icon).
sizedefault"default""sm" | "default" | "lg"Diameter.
srcstringImage URL;
fallbackor initials show while it loads or if it fails.status"online" | "away" | "busy" | "offline"Presence dot in the corner, announced with the name.
| Prop | Type | Default |
|---|---|---|
alt*Person's name: used for alt text and initials fallback. | string | — |
fallbackOverrides initials (text or icon). | ReactNode | — |
sizeDiameter. | "sm" | "default" | "lg" | "default" |
srcImage URL; | string | — |
statusPresence dot in the corner, announced with the name. | "online" | "away" | "busy" | "offline" | — |
* required. Every component also takes className.