UI Components
AvatarStack
A row of overlapping user avatars with auto-generated initials, color coding, and an overflow "+N" badge.
Quick Preview
AJ
BS
CW
DL
+2
Installation
// Copy AvatarStack.tsx to your components/ui/ folder// src/components/ui/AvatarStack.tsx
Usage
import { AvatarStack } from '@/components/ui/AvatarStack'// Text-only (auto-generates initials + colors)<AvatarStackavatars={[{ name: 'Alice Johnson' },{ name: 'Bob Smith' },]}max={4}/>// With images<AvatarStackavatars={[{ name: 'Alice', src: '/alice.jpg' },{ name: 'Bob', src: '/bob.jpg' },]}/>
Examples
Sizes
sm
AJ
BS
CW
DL
EM
+1
md
AJ
BS
CW
DL
EM
+1
lg
AJ
BS
CW
DL
EM
+1
Team Assignment (Linear-style)
Dashboard Redesign
Due in 3 days
AJ
BS
CW
+1
API Integration
Due tomorrow
BS
CW
User Testing
Due next week
AJ
BS
CW
+3
Prompt Preview
Copy a prompt that recreates this UI
Paste this into your AI coding assistant to generate code that closely matches the reference, including color, size, shape, typography, spacing, and polish.
Copy-ready AI prompt
Starts from the current visual reference and project constraints.
Tweak only product-specific copy or data after the first generation pass.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
avatars* | Array<{ name: string; src?: string; color?: string }> | - | List of avatar data objects |
max | number | 4 | Maximum avatars shown before +N badge |
size | "sm" | "md" | "lg" | "md" | Size of each avatar |