Avatar Group

Overlapping stack of avatars with a cut-out ring around each face and a +N count for the rest. When someone joins, the others slide over to make room and the count updates in place.

Preview

Installation

npx @lumioui/cli add avatar-group

Usage

import { AvatarGroup } from "@/components/ui/avatar-group/avatar-group";
<AvatarGroup />

Examples

Overflow

Who's going on an event invite.

Sizes

The stack at sm, md and lg in the rows that use them: a shared doc, a team, a meeting about to start.

API reference

Prop Type Default
items* AvatarGroupItem[] —
max number

Max avatars rendered before the "+N" overflow bubble. Default 4.

4
size "sm" | "md" | "lg"

Avatar size. Default "md".

"md"
onItemPress
(item: AvatarGroupItem … (item: AvatarGroupItem, index: number) => void

Fired when an avatar is tapped — makes avatars pressable.

—
onOverflowPress (items: AvatarGroupItem[]) => void

Makes the "+N" bubble tappable (open the full roster).

—
animate boolean

Switch-on entrance on mount (dim → on, 40ms apart). Default true.

true
haptic "light" | "selection" | false

Haptic on taps. Default "light".

"light"
ringClassName string

Classes for the cut-out ring around each avatar. Match it to the surface the stack sits on. Default border-card (rows, cards).

—
className string —