Component

Avatar

Avatars represent a person visually — as a photo, initials, or a fallback icon — with an optional presence or verification badge. Every size, surface, and status colour is wired to the --components-avatar-* tokens.

Storybook
Playground
Type
Size
Alt text
Status badge
Status
Preview
Aakash Prajapatixs · 24px
JSX
<Avatar
  type="image"
  size="xs"
  src="/avatars/aakash.jpg"
  alt="Aakash Prajapati"
  status="online"
  showStatusIcon
/>

Props

The full AvatarProps API. Props marked Required have no default.

PropTypeDefaultDescription
type
'image' | 'initials' | 'icon''image'Visual representation of the avatar — a photo, initials, or a fallback icon.
size
'xs' | 'sm' | 'lg' | 'x-lg' | '2x-lg''xs'Avatar diameter (24 / 32 / 40 / 48 / 56px) — also drives the status-badge size and initials typography.
status
'online' | 'offline' | 'away' | 'busy' | 'verified''online'Presence or verification state shown in the status badge.
showStatusIcon
booleantrueShow the status badge at the bottom-right. Requires status.
label
string'AP'Initials text — required when type="initials" (e.g. "AP", max 2 chars).
src
stringImage URL — required when type="image".
alt
stringAlt text — required when type="image"; use the person's full name.
changeIcon
ReactNodePersonOutlineIconIcon-swap override — only applies when type="icon". Defaults to PersonOutlineIcon (M_person_outline); pass any icon from nexus/icons to swap it.
className
stringLayout-only classes (margin, positioning).