Ballmac UI home

Avatar Circles

Overlapping avatars that spread on hover, lift individually with a name and role tooltip, show presence, fall back to initials and end in a +N count that can be a button.

+243

248 people are working on this project

Installation

$ pnpm dlx shadcn@latest add @ballmac/avatar-circles

Usage

import { AvatarCircles } from "@/components/ballmac/avatar-circles"

The full example is in the Code tab above.

Examples

Sizes and overflow button

API reference

PropTypeDefault
people*

The people to show, first on the left.

AvatarPerson[]—
max

How many faces show before the "+N" circle.

number5
total

Total number of people, when more than `people.length` (for example 1,200 members but 8 loaded).

number—
size

Face size.

keyof typeof SIZES"default"
onOverflowClick

Makes the "+N" circle a button.

() => void—
label

Accessible name of the whole group.

string—

Also accepts the standard attributes of its root element.

Accessibility

KeyAction
TabEach person is focusable and shows the tooltip on focus
Screen readersNamed 'Ada Lovelace, online'; the group announces the people count
Reduced motionNo lift; the spread still happens with a plain transition

Use with AI

<AvatarCircles people={[{ name, src, role, status, href }]} max total size onOverflowClick />. Each face is a link or button named with its person (and status). total adds the +N when only some are loaded. With the shadcn MCP server set up (guide), ask your agent:

Add the Ballmac UI Avatar Circles (@ballmac/avatar-circles) to this project with the shadcn MCP, then use it where it fits.

Use it for

  • Showing who is in a project, document or room
  • Social proof next to a call to action

Not for

  • A plain compact row (avatar-stack)
  • Large member tables (data-table)

Registry JSON: https://ui.ballmac.com/r/avatar-circles.json

Credits

Free to use in personal and commercial projects.