Skip to content

AvatarGroup

Displays a stacked group of Avatars with shared size and overlap.

<AvatarGroup {...args}>
<Avatar name="Ada Lovelace" src="https://i.pravatar.cc/256?img=47" />
<Avatar name="Grace Hopper" src="https://i.pravatar.cc/256?img=32" />
<Avatar name="Katherine Johnson" />
</AvatarGroup>
+4
<AvatarGroup {...args}>
<Avatar name="Ada Lovelace" src="https://i.pravatar.cc/256?img=47" />
<Avatar name="Grace Hopper" src="https://i.pravatar.cc/256?img=32" />
<Avatar name="Katherine Johnson" />
<AvatarGroupOverflow count={4} />
</AvatarGroup>
<AvatarGroup {...args}>
<Avatar name="Ada Lovelace" />
<Avatar name="Grace Hopper" />
<AvatarGroupOverflow count={8} onClick={() => undefined} />
</AvatarGroup>
+4
<AvatarGroup {...args}>
<Avatar
alt="Ada Lovelace"
hasTooltip
name="Ada Lovelace"
src="https://i.pravatar.cc/256?img=47"
/>
<Avatar
alt="Grace Hopper"
hasTooltip
name="Grace Hopper"
src="https://i.pravatar.cc/256?img=32"
/>
<Avatar hasTooltip name="Katherine Johnson" />
<AvatarGroupOverflow count={4} />
</AvatarGroup>
+4
+4
+4
+4
+4
<div style={{display: 'flex', flexDirection: 'column', gap: 16}}>
{(['tiny', 'xsmall', 'small', 'medium', 'large'] as const).map(size => (
<AvatarGroup aria-label={`${size} group`} key={size} size={size}>
<Avatar name="Ada Lovelace" />
<Avatar name="Grace Hopper" />
<Avatar name="Katherine Johnson" />
<AvatarGroupOverflow count={4} />
</AvatarGroup>
))}
</div>
+5
+5
+5
<div style={{display: 'flex', flexDirection: 'column', gap: 16}}>
{([24, 48, 96] as const).map(size => (
<AvatarGroup aria-label={`${size}px group`} key={size} size={size}>
<Avatar name="Ada Lovelace" />
<Avatar name="Grace Hopper" />
<AvatarGroupOverflow count={5} />
</AvatarGroup>
))}
</div>
View all
<AvatarGroup {...args}>
<Avatar name="Ada Lovelace" />
<Avatar name="Grace Hopper" />
<AvatarGroupOverflow count={12}>View all</AvatarGroupOverflow>
</AvatarGroup>
<AvatarGroup
{...args}
data-analytics="member-group"
id="member-group"
onMouseEnter={() => undefined}
title="Project members">
<Avatar name="Ada Lovelace" />
<Avatar name="Grace Hopper" />
<AvatarGroupOverflow
count={4}
data-analytics="member-overflow"
onClick={() => undefined}
title="View all members"
/>
</AvatarGroup>

Displays a stacked group of Avatars with shared size and overlap.

PropTypeDefaultDescription
aria-labelstring—Accessible label for the group. Default is "Avatars".
children*ReactNode—Avatar and AvatarGroupOverflow children.
classNamestring—Additional CSS class names applied to the root element.
data-testidstring—Test ID applied to the root element.
refRef<HTMLDivElement>—Ref forwarded to the root element.
size"small" | "tiny" | "xsmall" | "medium" | "large" | 16 | 20 | 24 | 32 | 36 | 40 | 48 | 60 | 64 | 72 | 96 | 128 | 144 | 180—Size applied to child Avatars. Individual Avatar size props are ignored while inside the group so the stack remains visually consistent.
styleCSSProperties—Inline styles applied to the root element.

Overflow indicator showing the count of hidden avatars in an AvatarGroup.

PropTypeDefaultDescription
childrenReactNode—Custom content rendered instead of the default "+N" text.
classNamestring—Additional CSS class names applied to the root element.
count*number—Number of hidden avatars represented by the overflow indicator.
data-testidstring—Test ID applied to the root element.
onClickMouseEventHandler<HTMLButtonElement>—Click handler. When set, the overflow indicator renders as a button.
refRef<HTMLElement>—Ref forwarded to the root element.
styleCSSProperties—Inline styles applied to the root element.