Brickslab.

@brickslab/ui-web

Stacked avatar circles component with overlap and counter badge. Shows a maximum number of avatars with a +N indicator for remaining users. Perfect for team displays, collaborators, and user groups.

Aperçu

Basic Stack (3 avatars)

Avatar
Avatar
Avatar

With People Count Label

Avatar
Avatar
Avatar
Avatar
42 people

Max 4 with +N Badge

Avatar
Avatar
Avatar
Avatar
+2
18 people

Larger Size (60px) with Custom Overlap

Avatar
Avatar
Avatar

With Clickable Profile Links

Avatar
Avatar
Avatar

Props Table

PropTypeDéfautRequisDescription
avatarUrlsarray: { imageUrl, profileUrl? }[]Array of avatar objects with image URL and optional profile link.
sizenumber40Avatar diameter in pixels.
overlapnumber10Overlap between stacked avatars in pixels.
maxnumber5Maximum number of avatars to show. Remaining count shown as +N badge.
numPeoplenumberTotal people count to display as label (e.g., '42 people').
showTooltipbooleanfalseShow avatar URL as tooltip on hover.
classNamestringAdditional CSS class for custom styling.

Usage

tsx
import { AvatarCircles } from "@brickslab/ui-web";

const avatars = [
  { imageUrl: "https://i.pravatar.cc/150?u=1" },
  { imageUrl: "https://i.pravatar.cc/150?u=2" },
  { imageUrl: "https://i.pravatar.cc/150?u=3" },
];

// Basic usage
<AvatarCircles avatarUrls={avatars} />

// With people count
<AvatarCircles 
  avatarUrls={avatars} 
  numPeople={42}
  max={5}
/>

// Custom size and overlap
<AvatarCircles 
  avatarUrls={avatars}
  size={50}
  overlap={15}
/>

// With profile links
<AvatarCircles 
  avatarUrls={[
    { imageUrl: "...", profileUrl: "/profile/user1" },
    { imageUrl: "...", profileUrl: "/profile/user2" }
  ]}
/>