NK

Search

Search pages, posts, and components

All components

Avatar Group Add

Data Display

Overlapping avatars with a + button that pops new ones in.

NKALGH+2

Installation

Add it with the shadcn CLI:

$pnpm dlx shadcn@latest add https://nawalkattel.com.np/r/avatar-group-add.json
Or install manually
  1. 1. Install dependencies

    pnpm add motion clsx tailwind-merge lucide-react
  2. 2. Copy the component source into components/library/avatar-group-add.tsx

Props

PropTypeDefaultDescription
avatarsstring[] - Initial members' initials.
extranumber0Count shown in the trailing +N chip.

Accessibility

  • The add button has an aria-label rather than relying on the icon alone.
  • Initials are real text, so they scale with the user's type size.
  • AnimatePresence keeps enter and exit transitions from stacking on rapid clicks.

Dependencies

motionclsxtailwind-mergelucide-react