Avatar

Displays a user image with initials fallback

Category: display · WCAG 2.2-AA · user, profile, image

Sizes

States

Props

PropTypeDefaultDescription
srcstringImage source URL.
altstringAlternative text describing the image.
namestringFull name — used to derive initials for the fallback and as the accessible label.
fallbackstringExplicit fallback text (initials/glyph); overrides initials derived from name.
size'xs' | 'sm' | 'md' | 'lg' | 'xl'mdVisual size of the component (e.g. 'sm', 'md', 'lg').
status'online' | 'offline' | 'busy'Status state.

Design tokens

When to use

When not to use

How to build an accessible Avatar in React →

Examples

Image

<Avatar src="/jane.jpg" alt="Jane Doe" />

Initials from name

Derives initials automatically; also sets the accessible label.

<Avatar name="Ada Lovelace" /> // renders "AL"

Explicit fallback

<Avatar fallback="JD" alt="Jane Doe" />

With status

<Avatar name="Jane Doe" status="online" />

Related components

← Back to docs