Skip to Content

Avatar

The Avatar component displays a user’s initials or image with optional status indicators. Use AvatarGroup to stack multiple avatars with an overflow count.

Preview

Sizes
Status indicators
Avatar group
+2

Import

import { Avatar, AvatarGroup } from '@chloe0592/pebble'

Usage

<Avatar name="Klaudija Ljevar" /> <Avatar name="Klaudija Ljevar" size="lg" status="online" /> <AvatarGroup max={3}> <Avatar name="Klaudija Ljevar" /> <Avatar name="Alex Kim" /> <Avatar name="Sam Patel" /> <Avatar name="Jordan Lee" /> </AvatarGroup>

Props — Avatar

PropTypeDefaultDescription
namestringUsed to generate initials and as the accessible label
srcstringImage URL. Falls back to initials if omitted or on error
altstringAlt text for the image
size'xs' | 'sm' | 'md' | 'lg' | 'xl''md'Avatar size
status'online' | 'offline' | 'busy' | 'away'Status indicator shown as a colored dot

Props — AvatarGroup

PropTypeDefaultDescription
maxnumberMaximum avatars to show before displaying an overflow count
size'xs' | 'sm' | 'md' | 'lg' | 'xl''md'Size applied to all avatars in the group