Design System
Data display

Avatar

A person's photo, falling back to initials when none is on file. To show several people together use Avatar group.

Purpose

The fallback is the common case in this product: most members have no photo, so initials are what people actually see.

Example

JTAL

When a photo is on file, compose AvatarImage with the fallback behind it — the initials render while the image loads and whenever it fails. The alt names the person for screen readers:

Photo with initials fallback
<Avatar>
  <AvatarImage src={member.photoUrl} alt="Josephine Tan" />
  <AvatarFallback>JT</AvatarFallback>
</Avatar>

For several people together — the overlapping cluster with an automatic overflow count — use Avatar group rather than composing it by hand.

Structure

The tokens behind the frame.

PropertyValue
Size40px (size-10) — resize with className
Shapecircle (rounded-full), content clipped (overflow-hidden)
Imagefills the frame (aspect-square size-full)
Fallback fill--accent, with --accent-foreground initials
Fallback type14px / Inter 600 (text-sm font-semibold), centred

Best practices

Do

  • Always provide an AvatarFallback — the photo is the exception, not the rule.
  • Keep initials to two characters, from the person's display name.
  • Name the person in alt when the avatar is their only representation.
  • Use Avatar group for clusters — never overlap avatars by hand.

Don't

  • Use an avatar for organisations or objects — it signals a person.
  • Write alt="avatar" or alt="photo" — the alt is the person's name or nothing.
  • Shrink below 24px; two initials stop being legible.

Accessibility & keyboard

  • alt on AvatarImage names the person — "Josephine Tan", not "avatar" or "profile photo".
  • The initials fallback is read as literal text ("JT"). When the person's name is already visible next to the avatar — a table row, a comment header — that announcement is duplicate noise: put aria-hidden="true" on the AvatarFallback, and an empty alt="" on the image, so the visible name is the single source.
  • When the avatar stands alone (a topbar account button, a compact list), it must carry the name — alt on the image, or an aria-label on the interactive element wrapping it.
  • Keyboard: none — an avatar is non-interactive. If it opens a menu, the wrapping button owns focus and the keyboard interaction.

Props

Avatar, AvatarImage and AvatarFallback are thin styled wrappers over the Radix Avatar primitives and accept the corresponding Radix props unchanged — src, alt and onLoadingStatusChange on the image, delayMs on the fallback — plus any HTML attribute.

Avatar in Storybook

On this page