Avatar Group
A component for rendering a group of avatars, supporting different stacking directions and action buttons.
1.3 KB
•Updated on September 1, 2026
Installation
Bash
pnpm dlx shadcn@latest add @spaceui/components-spaceui-avatar-groupUsage
Code
import { Avatar, AvatarFallback, AvatarImage } from '@/components/ui/avatar'
import { AvatarGroup, AvatarGroupAction } from '@/components/spaceui/avatar-group'Code
<AvatarGroup stacking="left">
<Avatar>
<AvatarImage />
<AvatarFallback>U1</AvatarFallback>
</Avatar>
<Avatar>
<AvatarImage />
<AvatarFallback>U2</AvatarFallback>
</Avatar>
<AvatarGroupAction>+4</AvatarGroupAction>
</AvatarGroup>Features
With Actions
Use the AvatarGroupAction component to add an interactive trailing element. It can contain text indicating remaining users or an icon for interaction (e.g., a plus button to add members).
API Reference
AvatarGroup Props
| Prop | Type | Default | Description |
|---|---|---|---|
stacking | left|right | right | Controls the visual z-index overlap of the avatars |
Keep in mind
- MIT License: Free and open-source for personal and commercial use. Feel free to copy, tweak, and adapt the components to match your exact needs.
- Credits & Inspiration: Some components on this site are inspired by or recreated from great ideas across the web. I'm not here to take credit; just to learn, experiment, and push interface craft further.
- Reach out & Claims: If an attribution was missed, or if you have any inquiry or claim, feel free to reach out directly on X to @adrielzimbril. I'll be glad to update or resolve it right away.
Related Components
Avatar ExtendedAvatar
Extended avatar components with badges, indicators, and logos.
ViewMember SelectorAvatar
An interactive participant and member avatar selector with dynamic row layout, animated selection badges, quick-add button, and searchable popover.
ViewAvatarAvatar
Accessible Avatar primitive component for Space UI.
View