---
title: "Avatar Group"
description: "Shows a few people as overlapping avatars with a count of the others. Every avatar gets the same size and corner, and the count can open the full list."
url: https://gelatinui.com/components/avatar-group
markdown_url: https://gelatinui.com/components/avatar-group.md
access: free
install: "npx shadcn@latest add @gelatin-ui/avatar-group"
registry_item: https://gelatinui.com/r/avatar-group.json
version: "2026-11-12"
index: https://gelatinui.com/llms.txt
docs_index: https://gelatinui.com/docs/llms.txt
---

# Avatar Group

> Shows a few people as overlapping avatars with a count of the others. Every avatar gets the same size and corner, and the count can open the full list.

Page: https://gelatinui.com/components/avatar-group

## When to use it

Best for: A few people in a small space, such as a table row or a card, with a count of the others.

- Set `size` and `rounded` on the group: every avatar and the count inside take them.
- End with an `AvatarGroupCount` for the people that do not show.
- Render the count as a button that opens the full list when people need the names.

## When not to use it

- For one person, use an [Avatar](https://gelatinui.com/components/avatar.md).
- For a list of people with names, use an [Item](https://gelatinui.com/components/item.md).

## Notes for agents

- It installs with Avatar: the code is in `ui/avatar.tsx`, as in shadcn.
- Inside a button, pass `render={<span />}`: a `<div>` is not valid in a `<button>`.
- On a popover or a card, pass `className="*:ring-popover"` so the ring matches the surface.

## API reference

### AvatarGroup

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `size` | `"default" \| "lg" \| "sm" \| "xl" \| "xs"` | "default" |  |
| `rounded` | `"default" \| "full"` | "full" |  |

Also takes every prop of Base UI `UseRender`: https://base-ui.com/react/components/use-render

### AvatarGroupCount

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `rounded` | `"default" \| "full"` |  |  |
| `size` | `"default" \| "lg" \| "sm" \| "xl" \| "xs"` |  |  |

Also takes every prop of Base UI `UseRender`: https://base-ui.com/react/components/use-render

## Usage

Put avatars in the group and end with a count.

```tsx title="project-people.tsx"
import {
  Avatar,
  AvatarFallback,
  AvatarGroup,
  AvatarGroupCount,
  AvatarImage,
} from "@/components/ui/avatar";

export function ProjectPeople() {
  return (
    <AvatarGroup size="sm">
      <Avatar>
        <AvatarImage src="/photos/amara.webp" alt="Amara Okafor" />
        <AvatarFallback>AO</AvatarFallback>
      </Avatar>
      <Avatar>
        <AvatarImage src="/photos/hiro.webp" alt="Hiro Sato" />
        <AvatarFallback>HS</AvatarFallback>
      </Avatar>
      <AvatarGroupCount>+4</AvatarGroupCount>
    </AvatarGroup>
  );
}
```

## Compose

Rules:

- Compose the parts (`compose-parts`): Build each item from its named parts as children, and pass your text and icons in as parts.
- Every state is designed (`every-state`): Give each view of data its loading, empty, and error states: a skeleton in the final layout, an `Empty` with an illustration and one next action, and an error that says what failed and how to retry.

## Add it

```bash
npx shadcn@latest add @gelatin-ui/avatar-group
```

It adds 8 registry items: 4 files, 1513 lines, and the npm packages `@base-ui/react`, `clsx`, `tailwind-merge`, `tailwind-variants`.

## Built on

- [Avatar](https://gelatinui.com/components/avatar.md)

## For AI agents

- Every item, one file: https://gelatinui.com/llms.txt
- MCP server (`search_items`, `get_item`, `get_install_plan`): https://gelatinui.com/mcp

## Related

- [Avatar](https://gelatinui.com/components/avatar.md)
- [Popover](https://gelatinui.com/components/popover.md)
- [Badge](https://gelatinui.com/components/badge.md)

## Accessibility

The group has no name of its own: the names are in the `alt` of each image, or in a visible label next to the group.

A group of decoration takes `aria-hidden`.
