Display
Avatar
People and accounts, alone or in groups.
Sizes and shapes
Five sizes from 24 to 64px, as a circle for people or a rounded square for organisations and products. Initials scale with the size.
When to use
- Identify a person or account: comments, assignees, menus, tables.
- Show who is in a group, with a “+N” for the rest.
- Show presence with a status dot.
Not for: decorative images (use an image), or logos that need their own aspect ratio.
Image and fallback
The fallback is always rendered under the image. If the image fails to load, AvatarImage removes itself and the initials show. Use getInitials(name) for up to two letters, or put an icon inside.
Status
A presence dot with a ring in the surface colour. Its colour is status only, and it has an accessible name.
- ARAmina Rahmanonline
- JWJonas Weberaway
- MTMei Tanakabusy
- CDCarlos Díazoffline
Group
AvatarGroup overlaps its avatars with a ring. max collapses the rest into “+N”. On a card, set --ui-avatar-ring to the card surface so the ring blends in.
API
Avatar
| Prop | Type | Default | Description |
|---|---|---|---|
| size | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'md' | 24 / 32 / 40 / 48 / 64px. Inherited from an AvatarGroup when not set. |
| shape | 'circle' | 'rounded' | 'circle' | Rounded square for organisations. |
| status | 'online' | 'away' | 'busy' | 'offline' | — | Presence dot on the bottom-right. |
| statusLabel | string | — | Accessible name for the dot. Defaults to “Online”… |
AvatarImage
| Prop | Type | Default | Description |
|---|---|---|---|
| src | string | — | Image URL. Nothing is rendered if it is missing or fails. |
| alt | string | — | Required. The person’s name; "" only if the name is shown beside it. |
AvatarGroup
| Prop | Type | Default | Description |
|---|---|---|---|
| size | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | — | Size for every avatar inside. |
| max | number | — | Show this many, then a “+N” avatar. |
AvatarFallback takes initials or an icon. All parts forward ref, className and native props.
Accessibility
- The image’s alt text is the person’s name. When the name is printed next to the avatar, pass alt="" so it is not read twice.
- The status dot is role="img" with a label (“Online”), never colour alone.
- AvatarGroup is role="group"; give it an aria-label (“Project members”).
- Fallback initials are real text and meet 4.5:1 on their fill in light and dark.
Motion
- No motion of its own: avatars are static so a list of them stays calm.
- Only AvatarImage is a client component (it watches for load errors); Avatar, AvatarFallback and AvatarGroup render on the server.