Display
Avatar Group
A stack of overlapping avatars for a team or list of participants, with a "+N" indicator for the rest.
Installation #
With the Nuxt module, every component is auto-imported — there is nothing to add. In a plain Vue project, import what you use:
Copy
import { JAvatarGroup } from '@juxtui/ui'Usage #
Copy
<JAvatarGroup :items="[
{ src: '/ada.jpg', name: 'Ada Lovelace' },
{ name: 'Grace Hopper' },
]" :max="4" />Each item is the same shape JAvatar takes — src and name — so fallbacks and initials work the same way here.
Overlap and ring colour aren’t configurable per instance; they follow --j-avatar-group-overlap and the surface behind the group.
Variants & examples #
Sizes and shapes#
Overflow#
Anything past max collapses into a count.
+6
9 reviewers requestedAPI #
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| items | Array<{ src?: string, name?: string }> | — | The people or entities to render, in order. |
| max | number | — | Avatars shown before the rest collapse into a "+N" indicator. Unset shows all of them. |
| size | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'md' | Passed through to each JAvatar. |
| shape | 'circle' | 'square' | 'circle' | Passed through to each JAvatar and the overflow indicator. |
Accessibility #
- The group is exposed as
role="group"labelled with the total count, e.g. “5 people” — independent of how many are actually visible. - The overflow indicator is a plain element with a
titletooltip; it isn’t reachable by keyboard, since it triggers nothing.