Avatar
Display user profile images with fallback initials, badges, and grouping support.
JD
AS
1import { Avatar } from "@/zeroui/components/avatars";23export default function Example() {Sizes
X
S
M
L
X
1<Avatar size="xs" fallback="XS" />2<Avatar size="sm" fallback="SM" />3<Avatar size="md" fallback="MD" />Shapes
1<Avatar shape="circle" src="..." />2<Avatar shape="square" src="..." />With Badge

1<AvatarBadge src="..." showStatus badgeColor="green" />2<AvatarBadge src="..." showStatus badgeColor="red" />3<AvatarBadge src="..." badgeContent={<img src="flag.png" />} />Avatar Group
+3
+2
+1
1<AvatarGroup2 avatars={[3 { src: "...", alt: "User 1" },Installation
npx zeroui@latest add avatarProps
| name | type | default | description |
|---|---|---|---|
| src | string | undefined | - |
| alt | string | "Avatar" | - |
| fallback | string | undefined | - |
| size | "xs" | "sm" | "md" | "lg" | "xl" | "md" | - |
| shape | "circle" | "square" | "circle" | - |
| border | boolean | false | - |
| borderColor | "default" | "white" | "primary" | "default" | - |
| className | string | "" | - |