Components · Content
AvatarGroup
A row of overlapping round avatars. people lists each name (with optional initials, up to 3 letters, and tone); max (1-10, default 5) circles show, then a "+N" count. Set total when people lists only some of a larger group ("Join 2,400 others"). size: sm to xl, as Avatar. Screen readers hear one name for the row, such as "5 people: Maya Chen, Omar Haddad, and 3 more".
ExamplesLink to this section
Show JSONHide JSON
{
"version": 1,
"root": "avatar-group",
"elements": {
"avatar-group": {
"type": "AvatarGroup",
"props": {
"people": [
{ "name": "Maya Chen" },
{ "name": "Omar Haddad", "tone": "info" },
{ "name": "Priya Nair", "tone": "success" },
{ "name": "Tomás de la Cruz", "tone": "warning" },
{ "name": "Ines Okafor" },
{ "name": "Dana Whitfield", "tone": "info" }
],
"max": 4
}
}
}
}`total` counts everyone, so the "+N" count covers people the spec does not list.
Join 2,400 teams already counting their shelves.
Show JSONHide JSON
{
"version": 1,
"root": "row",
"elements": {
"row": {
"type": "Box",
"props": {
"direction": "horizontal",
"align": "center",
"gap": "sm",
"wrap": true
},
"children": ["faces", "words"]
},
"faces": {
"type": "AvatarGroup",
"props": {
"people": [
{ "name": "Maya Chen" },
{ "name": "Omar Haddad", "tone": "info" },
{ "name": "Priya Nair", "tone": "success" }
],
"total": 2400,
"size": "sm"
}
},
"words": {
"type": "Text",
"props": {
"text": "Join 2,400 teams already counting their shelves.",
"tone": "muted",
"size": "sm"
}
}
}
}PropsLink to this section
Generated from the zod schema the server validates with. Unknown props are ignored with a warning. Any prop can also be a dynamic value such as { "$state": "/path" }; it is checked again once it resolves.
| Prop | Type | Limits and defaults |
|---|---|---|
| peoplerequired | object[] | 1–50 items |
| people[].namerequired | string | max 80 chars |
| people[].initials | string | 1–3 chars |
| people[].tone | "neutral" | "info" | "success" | "warning" | "danger" | — |
| max | integer | 1–10 |
| total | integer | 1–1,000,000 |
| size | "sm" | "md" | "lg" | "xl" | — |
RulesLink to this section
- Screen readers hear one name for the row: how many people, the names drawn, and how many more ("6 people: Maya Chen, Omar Haddad, Priya Nair, Tomás de la Cruz, and 2 more").
totalis at least the number ofpeoplelisted; leave it out when the list is everyone.- Like Avatar, a circle shows initials and never loads a picture.
initials(up to 3 letters) replaces the letters taken fromname.
Children and eventsLink to this section
AvatarGroup is a leaf: it does not show children. Validation warns when a leaf has some; wrap them in a Stack or Card instead.
It emits no events.