Avatar group
The people on a record, overlapping, the rest counted.
import { AvatarGroup } from "@forgeron/ui";import { AvatarGroup } from "@forgeron/ui";
const team = [
"Hugo Bernard",
"Nadia Petit",
"Léa Martin",
"Tom Garnier",
"Camille Roux",
"Inès Faure",
];
export default function Default() {
return (
<>
<AvatarGroup names={team.slice(0, 3)} />
<AvatarGroup names={team} label="6 members" />
<AvatarGroup names={team} max={3} size={32} label="6 members" />
</>
);
}API → Props
| Prop | Type | Default | Description |
|---|---|---|---|
names | string[] | — | Names or emails, in order. |
max | number | 4 | Avatars before the +n square. |
size | number | 24 | In px. |
label | string | — | Said once, e.g. 6 members. |
className | string | — | Extra classes. |