Skip to content

Avatar Cluster

An overlapping group of avatars expands with floating name cards.

LIVE PREVIEWInteract with the component
Just React. No extra dependencies.

Copy the component and its CSS module into your project.

CSS Modules

Usage

Matches your current playground settings.

jsx
import AvatarCluster from "./AvatarCluster";
export default function Example() {
return (
<AvatarCluster
items={[
{
"id": "al",
"name": "Alex Lane",
"description": "Designer",
"initials": "AL",
"color": "#aa8d77"
},
{
"id": "mk",
"name": "Maya Kim",
"description": "Creative developer",
"initials": "MK",
"color": "#82759e"
},
{
"id": "jr",
"name": "Jules Reed",
"description": "Art director",
"initials": "JR",
"color": "#688882"
},
{
"id": "sw",
"name": "Sam West",
"description": "Motion designer",
"initials": "SW",
"color": "#b8787d"
}
]}
size={66}
overlap={18}
borderColor={"#18151c"}
accentColor={"#d5bee8"}
/>
);
}

Using Avatar Cluster

Use Avatar Cluster for contributors, collaborators, or a small team. Pass each person's display information through items.

Adjust size and overlap together to keep neighbouring portraits recognisable. Connect onSelect to the profile or action you want to open.

Props

NameTypeRequiredDefaultDescription
itemsobject[]No[]Array of { id, name, description?, image?, initials?, color? }. Without an image, initials are derived from the name.
onSelectfunctionNoundefinedCalled with (item, index) when an avatar is activated.
activeIndexnumber | nullNoundefinedOptional controlled open name-card index. Null hides all name cards.
onActiveChangefunctionNoundefinedCalled with the hovered or focused index, or null on leaving.
sizenumberNo58Avatar diameter in pixels.
overlapnumberNo16Overlap between neighboring avatars in pixels, capped to 65% of size.
borderColorstringNo"#18151c"Avatar border colour; match it to your container background.
accentColorstringNo"#d5bee8"Keyboard focus-ring colour.
classNamestringNo""Additional CSS classes, merged with the component styles.
styleCSSPropertiesNoundefinedInline styles for caller-defined sizing and visual overrides.

Related components

Pagination Rail

Navigation

A raised selection moves through a compact row of numbered page controls.

Layered chevron tabs create a compact trail with a distinct current page.

Folding Menu

Navigation

Numbered navigation panels unfold beneath a compact, tactile trigger.

Path Stepper

Navigation

Numbered stops connect into a clean vertical route with completed and current states.