Skip to content
GitHub (opens in a new tab)

AvatarGroup

Overlapping row of kit Avatars with an optional leftover count.

stableMoleculecontracts/avatargroup.json

Preview

AvatarGroup

Overlapping kit Avatars. Leftover is +N, not another person.

Master

Six people at medium size: three faces plus +3. Set size from xs to xl, as on Avatar.

Maya ChenAJNoah Williams+3

Usage

Only kit Avatars. One person is Avatar. Badge is not for people. Extra people collapse to +N, not another face; screen readers hear it as 3 more. Each face has a card-coloured ring. Sizes match Avatar, xs 20 to xl 48.

Do's

  • Which mark: AvatarGroup is several people. One person is an Avatar; a number of items is a Count.
  • several people on a row, card, or table cell

Don'ts

<AvatarGroup size="md" max={3} ariaLabel="Assignees" items={[
  { name: "Maya Chen", src: "/faces/maya-chen.jpg" },
  { name: "Ada Jones" },
  { name: "Noah Williams", src: "/faces/noah-williams.jpg" },
  { name: "Leo" },
  { name: "Iris Okafor", src: "/faces/iris-okafor.jpg" },
  { name: "Rio Vale" },
]} />

When to use

  • Which mark: AvatarGroup is several people. One person is an Avatar; a number of items is a Count.
  • several people on a row, card, or table cell

When not to use

  • one person — use Avatar
  • status chips — use Badge
  • actions — use Button

What an agent reads

import { AvatarGroup } from "agentic-ds-kit";
must
  • role=group
  • optional aria-label names the group
  • leftover count is role=img with aria-label like "3 more" (KitLabels moreAvatars)
  • each Avatar has a surface.card ring so faces stay apart on any ground
defaults
  • size md
  • max 3
stops if
  • Do not invent a local avatar stack
  • Do not wrap non-Avatar content
  • Do not use raw hex
  • Do not put a status badge on faces
  • Do not make the group a button

From contracts/avatargroup.json: must is the a11y requirements, defaults the prop defaults, stops if the doNot rules where the agent asks instead of inventing a cousin.

Props

NameTypeRequiredDefaultNotes
itemsarrayYes——
sizexs | sm | md | lg | xlNomdSame scale as Avatar: xs 20 (one initial per Avatar), sm 24, md 32, lg 40, xl 48. Breaking: sm, md and lg were 32, 40 and 48.
maxnumberNo3how many Avatars to show before +N. If items.length <= max, no count. +N is a circle at the Avatar size and grows into a pill when the number needs more room (e.g. +12 at xs); the full number always shows.
ariaLabelstringNo—names the group, e.g. Assignees
  • Component
    →

    Avatar

    Face or initials for a person (circle) or an organisation (square).

  • Component
    →

    Badge

    Compact read-only status or category pill set by the system.

  • Component
    →

    Button

    Clickable action control with appearance × mode (plus an optional flat set) and a fixed set of sizes.

  • Component
    →

    Cell

    Inline cell content for datasets: text, link, avatar, file, payment, badge, trend, avatar group, select, progress, rating, or row actions, with optional checkbox.