Avatar Group
AvatarGroup shows several avatars that overlap, with a ring in the surface colour around each one to keep them separate.
<AvatarGroup size="3"> <Avatar src="/shruti.jpg" alt="Shruti Bhatia" fallback="SB" /> <Avatar fallback="KD" /> <Avatar fallback="+3" /></AvatarGroup>An avatar group shows several avatars in a row, and each one overlaps the one before it. A ring in the surface colour surrounds each avatar, so the circles stay separate.
Use a group to show who has access to something, who is in a meeting or who worked on a file. The overlap is fixed, so for avatars that do not overlap, put them in a Flex instead.
Set size once on the group, and every avatar inside it that has no size of its own uses it. An avatar that sets its own size keeps that size. At sizes 1 to 4, the group is as tall as a Button of the same size.
Each avatar keeps its own alt. Leave it empty when the names are written beside the group. When the faces are the only way to see who is there, give each avatar a name, and give the counting avatar a sentence such as "3 more members".
Props
Generated from the types. It lists what this component DECLARES: a prop that arrives from a shared type or from the platform is real and is not repeated here.
| Prop | Type | What it does |
|---|---|---|
size? | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | The size step for all avatars in the group, from 1 to 9. |
It also takes every prop of a <span>.
- A maximum count — How many faces to show is a decision for your product. Show the ones you want, then add one more Avatar whose fallback counts the rest, such as +3.
- A spacing prop — The overlap is fixed so that every group looks the same across your app. For avatars that do not overlap, put them in a
Flexwith agap.