npx shadcn@4.23.1 add https://registry.goop.so/g/<link>/trail-avatar-group.json --yesAvatar group
ProA row of people's avatars overlapping one another, for who is on a project or in a thread, for React and Tailwind CSS. Part of Goop Pro.
What an agent sees
import { AvatarGroup } from '@/components/ui/goop/avatar-group';
import { Avatar, AvatarFallback } from '@/components/ui/goop/avatar';
<AvatarGroup aria-label="People on this list" size="sm" max={3}>
<Avatar variant="solid" name="Teodora Valk">
<AvatarFallback>TV</AvatarFallback>
</Avatar>
<Avatar variant="solid" name="Bilal Rashed">
<AvatarFallback>BR</AvatarFallback>
</Avatar>
<Avatar variant="solid" name="Ngozi Ilori">
<AvatarFallback>NI</AvatarFallback>
</Avatar>
<Avatar variant="solid" name="Yuto Sakamaki">
<AvatarFallback>YS</AvatarFallback>
</Avatar>
</AvatarGroup>Add and take away people, cap how many show (the rest fold into "+N"), say how many there are in all, and switch the size. The people are ours, shown by their initials.
When to use
- A row of people's avatars overlapping one another, for who is on a project or in a thread.
When not to use
- For one person use Avatar.
Installation
Paste the prompt below into your coding agent. It reads Goop's install steps, installs the part and its tokens once, then reuses this same Avatar group on every screen instead of drawing a new one: the same height, the same focus ring, the same spacing. As a Pro part, its command comes from Goop's server once you sign in, with a one-time link that lasts ten minutes.
npx shadcn@4.23.1 add https://registry.goop.so/g/<link>/trail-avatar-group.json --yesAdd the Goop Avatar group to this project. The install steps are at https://goop.so/docs/install.mdUsage
import { AvatarGroup } from '@/components/ui/goop/avatar-group';
import { Avatar, AvatarFallback } from '@/components/ui/goop/avatar';
<AvatarGroup aria-label="People on this list" size="sm" max={3}>
<Avatar variant="solid" name="Teodora Valk">
<AvatarFallback>TV</AvatarFallback>
</Avatar>
<Avatar variant="solid" name="Bilal Rashed">
<AvatarFallback>BR</AvatarFallback>
</Avatar>
<Avatar variant="solid" name="Ngozi Ilori">
<AvatarFallback>NI</AvatarFallback>
</Avatar>
<Avatar variant="solid" name="Yuto Sakamaki">
<AvatarFallback>YS</AvatarFallback>
</Avatar>
</AvatarGroup>- Fits: record (its recipe).
- width, corner: add no class for these.
API reference
| Option | Type | What it does |
|---|---|---|
| size | sm | md | lg = md | |
| max? | number | How many avatars are shown; not given (or not a whole number of none or more), all are. |
| total? | number | How many people there are when the children are only some of them; the count is this less the avatars shown. |
| more? | (count: number) => string | The words a screen reader hears for the people not shown, from their count; 4 more by default. |
- Class recipes (cva): avatarGroupStepVariants (AvatarGroup)
- data-slot values (to select a part by): avatar-group, avatar-group-end, avatar-group-item
Notes for AI
Give your coding agent this page as text instead of screenshots: the parts, the options, the states and the keys. An agent that reads the real part builds the real part, not a lookalike.