AvatarGroup component for building consistent, accessible interfaces.
Loading demo: avatar-group-real-world
npx sdaia-ui@latest add avatargroup
import { AvatarGroup } from '@/components/ui/AvatarGroup';<AvatarGroup max={3} items={[{ type: 'initials', initials: 'AK' }, { type: 'initials', initials: 'SR' }, { type: 'initials', initials: 'OH' }]} />A stacked row of avatars representing multiple users.
Loading demo: avatargroup-maxcount-do
Limits visible avatars and shows a count bubble for the remaining users.
Loading demo: avatargroup-maxcount-do
Props for the Avatar Group component.
Prop | Type | Default | Required |
|---|---|---|---|
items | AvatarGroupItem[] | — | required |
type | 'group' | 'individual' | 'group' | optional |
size | AvatarSize | 'md' | optional |
max | number | — | optional |
dir | 'ltr' | 'rtl' | — | optional |
rtl | boolean | — | optional |
How this component behaves at the three system breakpoints. Spacing and type tokens switch automatically at 768px and 1280px.
| Screen | Behavior |
|---|---|
| Desktop (1280px and up) | One row of fixed-size avatars, overlapping by 8px (group) or spaced apart (individual). Set max to replace the rest with a +N counter. |
| Tablet (768–1279px) | Same layout as desktop, with the tablet token values. |
| Phone (under 768px) | The row does not wrap or shrink. Set a lower max on phones to keep the group short. |