npx shadcn@4.23.1 add https://registry.goop.so/g/<link>/meadow-avatar-group.json --yesAvatar group
ProA row of people's avatars, each against the one before it, for who is on a project or in a thread, for React and Tailwind CSS. Part of Goop Pro.
What an agent sees
import { Avatar } from '@/components/ui/goop/avatar';
import { AvatarGroup } from '@/components/ui/goop/avatar-group';
const PEOPLE = ['Mira Okafor', 'Omar Haddad', 'Rosa Lind', 'Ada Moreau', 'Leon Varga'];
function StudyPeople({ people = PEOPLE }: { people?: string[] }) {
return (
<AvatarGroup aria-label="People on this study" size="sm" max={3} total={people.length}>
{people.map((person) => (
<Avatar key={person} variant="solid" name={person}>
{person}
</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, each against the one before it, 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>/meadow-avatar-group.json --yesAdd the Goop Avatar group to this project. The install steps are at https://goop.so/docs/install.mdUsage
import { Avatar } from '@/components/ui/goop/avatar';
import { AvatarGroup } from '@/components/ui/goop/avatar-group';
const PEOPLE = ['Mira Okafor', 'Omar Haddad', 'Rosa Lind', 'Ada Moreau', 'Leon Varga'];
function StudyPeople({ people = PEOPLE }: { people?: string[] }) {
return (
<AvatarGroup aria-label="People on this study" size="sm" max={3} total={people.length}>
{people.map((person) => (
<Avatar key={person} variant="solid" name={person}>
{person}
</Avatar>
))}
</AvatarGroup>
);
}- 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.