Skip to main content
  1. Docs
  2. Components
  3. Data display

Avatar group

A few people at a glance, then +N. One image to a screen reader, named in full.

Import
@qeetrix/react/experimental
Status
ExperimentalSince 0.0.8
Renders
<span role="img">Server-rendered
Tested
WCAG 2.2 AAaxe on every pull request

01

Import

avatar-group.tsx
// Experimental: from the package's experimental entry, until it's stable.
import { AvatarGroup } from "@qeetrix/react/experimental";

02

Props

And every native attribute of the element it renders.

PropTypeDefaultWhat it does
people{ name, src? }[]requiredThe people, or the first few when total is larger.
maxnumber3How many show before +N.
totalnumberpeople.lengthHow many there are in all: a group's 412 members.
size · shapeAvatarSize · AvatarShape"sm" · "circle"sm fits a table row; square for organisations and applications, with a square +N.
locale · messagesstring · objectthe provider'sThe counts and the list of names; label is "{count} people: {names}".

03

Parts

Each part carries a data-slot, for tests and placement.

data-slotElementWhat it is
avatar-group<span role="img">aria-label: the count and the names.
avatar<span>Each Avatar, decorative inside the group.
avatar-group-more<span>+N, aria-hidden.

04

From a paged API

Pass the first page's people and the API's total: the name says how many in all.

group-row.tsx
const { data } = useGroupMembers(group.id, { limit: 3 });

<AvatarGroup people={data.members} total={data.total} />
Next — Avatar groupAccessibility