Xzero UI
Pro library

Avatar group

Show a team or set of contributors in a small space.

$ pnpm dlx shadcn@4.23.0 add @xzero-ui/avatar-group
Live · keyboard ready

When to use

When not to use

Installation

Register both Xzero UI namespaces in your project's components.json:

{
  "registries": {
    "@xzero-ui": "https://mcp.xzero.co.uk/r/{name}.json",
    "@xzero-ui-pro": "https://mcp.xzero.co.uk/r/pro/{name}.json"
  }
}
npx shadcn@4.23.0 add @xzero-ui/avatar-group

Install xzero-foundation once, and import @/components/xzero/foundation.css in your app root. No Xzero token is used by this snapshot. For sample portraits, photos, fonts, or logos, download https://mcp.xzero.co.uk/install-assets.mjs and run node xzero-install-assets.mjs <receiving-project>.

Usage

import { AvatarGroup } from "@/components/xzero/avatar-group/avatar-group";

const team = [
  { name: "Maya Chen", src: "/people/maya.jpg", status: "online" as const },
  { name: "Leo Park" },
  { name: "Sara Ruiz" },
  { name: "Tom Hale" },
  { name: "Ines Ma" },
];

export function Collaborators() {
  return <AvatarGroup members={team} max={3} label="Editors" />;
}

API reference

AvatarGroup

An overlapping stack of avatars with a +N overflow chip.

PropTypeDefaultDescription
members (required){ name: string; src?: string; status?: "online" | "offline" }[]–People in display order. Names double as keys, so keep them unique.
maxnumber4Avatars shown before the rest collapse into the overflow count.
size"sm" | "md" | "lg""md"Size passed to each avatar and the overflow chip.
labelstring"Team members"Accessible name for the group, also used in the overflow label.

Accessibility

Motion

Responsive behavior

Performance

Notes for AI

Also in avatars

Guidance for AI tools

Avatar group: Show a team or set of contributors in a small space. Follow the declared prop types and do not invent props. Keep keyboard access, reduced motion support, and both light and dark themes intact when adapting it.

Full library index: https://ui.xzero.co.uk/llms.txt

Browse all components