Skip to content

Avatar

An Avatar represents a user or profile with a photo, initials from title, or a default user icon when neither image nor title is provided.

Loading Code Block...

If neither image nor title is set, the default user icon is shown.

Loading Code Block...

Initials come from title when no image is provided.

JD
Loading Code Block...

Pass an image URL to render a profile photo at the requested size. The component falls back to initials, then a default icon, when no image is set.

John Doe
Loading Code Block...

Supported sizes: 20, 24, 32, 40, 48, 56, 64, 72, 80, 96.

John Doe
20
John Doe
24
John Doe
32
John Doe
40
John Doe
48
John Doe
56
John Doe
64
John Doe
72
John Doe
80
John Doe
96
Loading Code Block...

default (avatar only), stacked (text under avatar), side-by-side (text beside avatar). Use the dropdown to switch variant; the snippet updates to match.

John Doe
Loading Code Block...

For stacked, use alignment: left, center, or right. Use the dropdown to switch alignment; the snippet updates to match.

John Doe

John Doe

Product Manager

Loading Code Block...

Renders a row of avatars with an optional +N when there are more than maxAvatars entries.

Loading Code Block...
Jane Doe
JS
King Grant
Luke Doe Peterson
Loading Code Block...

maxAvatars caps how many faces show before a +N badge. Default is 5. The component substitutes 2 when the value is <= 0, so maxAvatars=1 is a valid configuration that renders a single avatar plus a +N indicator.

Jane Doe
JS
King Grant
+2
Loading Code Block...

Set showPlusButton and handle to add members.

Jane Doe
JS
King Grant
+2
Loading Code Block...

Use size (xs | sm | md) for each avatar in the group respectively.

Jane Doe
JS
King Grant
Luke Doe Peterson
xs
Jane Doe
JS
King Grant
Luke Doe Peterson
sm
Jane Doe
JS
King Grant
Luke Doe Peterson
md
Loading Code Block...