# Avatar Stack

> Overlapping avatars that fan on hover and spring apart into a named list on a card growing out of the row.

## Spec sheet

| | |
| --- | --- |
| Access | Free: no account, free for commercial use |
| Shelf | Components › Avatars & Badges |
| Live preview | https://uibrik.com/components/avatar-stack |
| Writes | 1 file into `components/uibrik/avatar-stack/` |
| Packages | `@tabler/icons-react`, `motion` (the CLI installs them) |
| Needs | React 19, Tailwind CSS v4, a project set up with `npx shadcn@latest init` |
| Theme | Reads the shadcn tokens and follows class-based dark mode ([theming](https://uibrik.com/docs/theming.md)) |
| Updated | Nov 9, 2026 |

## Add it

```bash
npx shadcn@latest add https://uibrik.com/r/avatar-stack.json
```

With the `@uibrik` namespace in `components.json` ([setup](https://uibrik.com/docs/installation.md)): `npx shadcn@latest add @uibrik/avatar-stack`.

Can't run commands? https://uibrik.com/components/avatar-stack/prompt.txt has every file verbatim, with the setup steps, ready for an assistant to write.

## Render it

Renders as is; every value shown is the default, so delete any line you don't need.

```tsx
import { AvatarStack } from "@/components/uibrik/avatar-stack/avatar-stack";

const people = [
  { id: 1, name: "Maya Chen", role: "Design lead", src: "/registry/avatar-stack/maya.svg" },
  { id: 2, name: "Jonas Weber", role: "Engineering", src: "/registry/avatar-stack/jonas.svg" },
  // …4 more
];

<AvatarStack
  people={people}
  max={4}
  size={40}
  overlap={12}
  trigger="click"
/>
```

## Tune it

The same props as the Customize panel on https://uibrik.com/components/avatar-stack.

| Prop | Type | Default | What it does |
| --- | --- | --- | --- |
| `max` | `number` | `4` | Avatars shown in the row before the +N. |
| `size` | `number` | `40` | Avatar diameter. |
| `overlap` | `number` | `12` | How far each avatar tucks under the one before it. |
| `trigger` | `"click" \| "hover"` | `"click"` | What opens the list. |

## Wire it

The props the Customize panel doesn't show: ranges, data, content and callbacks.

| Prop | Type | Default | What it does |
| --- | --- | --- | --- |
| `people` (required) | `{ id; name; role?; src? }[]` |  | Avatars in order. Without a src the initials show. |
| `className` | `string` |  | Classes for the wrapper. |

## Where it fits

- **Document collaborators**: Overlapping faces show who is on a file in little space, and fan out on hover to name each person. Pairs with [Live Cursors](https://uibrik.com/components/live-cursors.md) (Pro).
- **Team rows in lists**: A compact stack fits inside a project or table row, and the card that grows out of it lists everyone. Pairs with [Data Table](https://uibrik.com/components/data-table.md) (Pro).
- **Social proof**: A row of real faces beside a sign-up form says that other people already use the product. Pairs with [Waitlist Input](https://uibrik.com/components/waitlist-input.md).

## Same shelf: Avatars & Badges

- [Contribution Avatar](https://uibrik.com/components/contribution-avatar.md) (Pro): An avatar wrapped in its own contribution graph: rings of days and spokes of weeks that light up in a sweep. Hover a day for its count and week, tap to pin it, and pick out a shade or the streak from the key.
- [Light Badge](https://uibrik.com/components/light-badge.md): A badge lit from below by a rotating gradient stroke and soft rays.
- [Social Avatar](https://uibrik.com/components/social-avatar.md): An avatar that fans the person's social accounts out of itself along an arc, with real brand logos that copy the handle or open the profile on press.
- [Status Badge](https://uibrik.com/components/status-badge.md): One status pill that moves between states: the tint eases to the new colour, the icon turns in, the label rolls and the pill glides to its new width.
- [Story Ring](https://uibrik.com/components/story-ring.md): An avatar in a segmented story ring that spins into dashes while a story loads, then drains the arc you opened to grey.
- [Tech Stack](https://uibrik.com/components/tech-stack.md): A row of real brand logos for the tools behind a product that open into tinted pills naming each one as neighbours slide aside.

## Ground rules

- Only the props above exist. To change anything else, edit the installed file.
- Keep the files in `components/uibrik/avatar-stack/` so the import paths keep resolving.
- The playbook for working with the whole library: https://uibrik.com/llms.txt
