Avatar Stack
Overlapping avatars that make room: hover or focus one and it lifts while neighbours part on a spring, revealing a frosted name tag with role and presence. The “+N” chip opens a tidy list of everyone else.
Try it: Hover or Tab across the faces; open the +N chip (Esc closes).
Installation
Install with the shadcn CLI:
npx shadcn@latest add https://www.framekitui.live/r/avatar-stack.jsonOr, with the @framekit namespace registered: npx shadcn@latest add @framekit/avatar-stack. You can also copy the source into components/ui/avatar-stack.tsx (view on GitHub).
Usage
import { AvatarStack } from '@/components/ui/avatar-stack'Props
| Prop | Type | Default | Notes |
|---|---|---|---|
people | StackPerson[] | DEFAULT_PEOPLE | { id, name, src?, role?, online? } — generated gradient initials when there is no src. |
max | number | 5 | Avatars shown before the +N chip. |
size | 'sm' | 'md' | 'lg' | 'md' | Avatar size; hit areas stay at least 44px. |
label | string | 'Editing now' | Caption after the stack ('' hides it). |
onSelect | (person) => void | — | Fires when an avatar or a listed name is activated. |
className | string | — | Extra classes merged onto the root. |
Dependencies
motion
Related Core components
- Button
Versatile button with variants and sizes.
- Breathing Dot
Soft pulsating status indicator.
- Badge
Compact status and label chips.
- Progress
Progress bar with semantic tones, sizes, an optional label with tabular percentage, and an indeterminate mode.
- Card
Composable surface with hairline ring and layered shadow; default, raised, glass and outline variants.
- Skeleton
Loading placeholders.