Components › Display

Avatar

An image with initials as fallback, a presence dot, and an overlapping group.

Installation

npx plankui@latest add avatar

Usage

import { Avatar } from "@/components/ui/avatar";

<Avatar src="/ana.jpg" fallback="AK" status="online" />

API reference

PropTypeDefaultDescription
fallbackstringrequiredInitials when there is no image.
size"xs" | "sm" | "md" | "lg""md"Diameter.
status"online" | "away" | "offline"Presence dot.
AvatarGroup.maxnumberCollapse the rest into a count.

View the source on GitHub