About
Overlapping avatar group with size (sm/md/lg) and spacing (tight/normal/loose) variants, image or fallback support, numeric overflow chip, and asChild on items/overflow so each avatar can render as a link or button.
Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Avatar Stack to your project and fits it to your theme.
Code
How Avatar Stack is used: the demo's code. The component's own source comes with a free account.
Usage.tsx
import {
AvatarStack,
AvatarStackItem,
AvatarStackOverflow,
} from "@/components/ui/avatar-stack";
export default function AvatarStackDemo() {
return (
<div className="flex min-h-[240px] w-full items-center justify-center bg-background p-8 text-foreground">
<AvatarStack size="md" spacing="normal">
<AvatarStackItem>AM</AvatarStackItem>
<AvatarStackItem>JK</AvatarStackItem>
<AvatarStackItem>RP</AvatarStackItem>
<AvatarStackItem>DL</AvatarStackItem>
<AvatarStackOverflow count={6} />
</AvatarStack>
</div>
);
}