Skip to main content

Avatar

A circular user image with automatic fallback to colored initials when no src is given or the image fails to load.

Playground​

JD
<Avatar
initials="JD"
width={40}
height={40}
status="online"
/>

Initials​

JD
AK
RS
MP
<Avatar initials="JD" />
<Avatar initials="AK" />

Sizes​

XS
SM
MD
LG
XL
<Avatar initials="SM" width={32} height={32} />
<Avatar initials="LG" width={56} height={56} />

Image with fallback​

<Avatar src="https://i.pravatar.cc/150?img=12" initials="JD" />

Status indicator​

A small presence dot, positioned at the bottom-right corner.

ON
OF
AW
BU
<Avatar initials="ON" status="online" />
<Avatar initials="BU" status="busy" />

Grouped avatars​

AvatarGroup stacks and overlaps its Avatar children, sizing them consistently, with an optional max to cap how many show before a "+N" overflow avatar.

JD
AK
RS
+2
<AvatarGroup max={3}>
<Avatar initials="JD" />
<Avatar initials="AK" />
<Avatar initials="RS" />
<Avatar initials="MP" />
<Avatar initials="TL" />
</AvatarGroup>

Props​

Avatar​

PropTypeDefaultDescription
initialsstringRequired. Fallback text shown when there is no image or it fails to load; only the first two characters are used, uppercased.
srcstringURI of the network image to display.
widthnumber40Width of the avatar in pixels.
heightnumber40Height of the avatar in pixels.
imagePropsOmit<ImageProps, 'source' | 'style'>Additional props forwarded to the underlying Image.
status'online' | 'offline' | 'away' | 'busy'Renders a presence dot at the bottom-right corner.
statusColorTVajraColorsOverrides the status dot's color token instead of the default status→tone mapping.

AvatarGroup​

PropTypeDefaultDescription
childrenReactNodeRequired. Avatar elements to stack.
sizenumber40Diameter (px) used to size each Avatar child consistently.
overlapnumbersize * 0.3How much each avatar overlaps its neighbor, in px.
maxnumberCaps the number of avatars shown, rendering a "+N" overflow avatar for the rest.