Skip to content

Avatar Group

A row of overlapping avatars with a “+N” overflow chip when there are more people than max.

<script>
import AvatarGroup from "@invisible-ui/svelte/AvatarGroup.svelte";
</script>

In Elements, assign the people as a property:

<ds-avatar-group label="Project team" max="3"></ds-avatar-group>
<script type="module">
document.querySelector("ds-avatar-group").items = [
{ name: "Ada Lovelace" },
{ name: "Grace Hopper" },
{ name: "Alan Turing" },
{ name: "Katherine Johnson" },
];
</script>
PropTypeDefaultDescription
items *AvatarGroupItem[]—People ({ name, src?, alt? }); name is the initials fallback.
maxnumber4Visible avatars before the "+N" chip.
size"sm" | "md" | "lg""md"Avatar size.
shape"circle" | "square""circle"Avatar shape.
label *string—Accessible name for the group.

The image src is rendered as given: pass only URLs you trust or have sanitized. See Security.

  • The group is a labelled list; each avatar exposes its name (or alt), and the overflow chip announces the remaining count.
<AvatarGroup
label="Project team"
items={[{ name: "Ada Lovelace" }, { name: "Grace Hopper" }]}
/>

In React:

<AvatarGroup
label="Project team"
max={3}
items={[{ name: "Ada Lovelace", color: "rebeccapurple" }, { name: "Grace Hopper" }]}
/>

Themeable via --ds-avatar-*.