Avatar Group
Display a stack of overlapping avatars with a count indicator for additional users.
+5
+4
1import { AvatarGroup } from "@/zeroui/components/avatars";23const avatars = [Max Display Count
+6
+4
+2
1<AvatarGroup avatars={avatars} max={2} />2<AvatarGroup avatars={avatars} max={4} />3<AvatarGroup avatars={avatars} max={6} />Sizes
+5
+5
+5
+5
1<AvatarGroup size="sm" avatars={avatars} max={3} />2<AvatarGroup size="md" avatars={avatars} max={3} />3<AvatarGroup size="lg" avatars={avatars} max={3} />Spacing
Tight
+4
Normal
+4
Loose
+4
1<AvatarGroup spacing="tight" avatars={avatars} max={4} />2<AvatarGroup spacing="normal" avatars={avatars} max={4} />3<AvatarGroup spacing="loose" avatars={avatars} max={4} />Installation
npx zeroui@latest add avatar-groupProps
| name | type | default | description |
|---|---|---|---|
| avatars | AvatarItem[] | required | - |
| max | number | 4 | - |
| size | "xs" | "sm" | "md" | "lg" | "xl" | "md" | - |
| shape | "circle" | "square" | "circle" | - |
| spacing | "tight" | "normal" | "loose" | "normal" | - |
| className | string | "" | - |