Avatar

A visual representation of a user or team.

Sizes

sm is 24px, the default is 32px, and lg is 40px.

ACACAC

Image

AvatarImage loads the photo. AvatarFallback shows initials until it loads, or instead of it when it fails.

DPRG

Badge

AvatarBadge marks presence in the bottom-right corner and scales with the avatar.

JLOnlineJLOnlineJLOnline

Group

AvatarGroup overlaps members by 8px with a white ring. End with AvatarGroupCount when the set is truncated; it matches the group's size.

ACJLRG
ACJLRGCK
+2
ACJLRGCK
+2

Stacking order

The first member sits on top by default. Set reverse so the last member sits on top; left-to-right order stays the same.

ACJLRG
ACJLRG

Best practices

When to use

  • Use to identify a person, team, integration or agent where recognition speeds up scanning.
  • Use an icon when the subject is a capability or action rather than an identity.

Behavior

  • Sizes: sm 24px for dense rows and notifications, default 32px, lg 40px for Entity media.
  • Always include AvatarFallback with initials; it shows while AvatarImage loads and when it fails.
  • AvatarBadge marks presence and scales with the avatar. Don't use it for counts.
  • AvatarGroup overlaps members by 8px with a white ring. Show at most four, then AvatarGroupCount ("+2"). Set reverse when the last member should sit on top.

Content

  • Initials are one or two uppercase letters from the display name.

Accessibility

  • Give AvatarImage meaningful alt text when it's the only name on screen; use alt="" when the name is next to it.
  • Label groups with the total (role="group" aria-label="6 reviewers"). Pair AvatarBadge with sr-only text such as "Online".