Avatar

Avatars that fall back to initials when the image fails, with shape, five sizes, presence and an overlapping AvatarGroup.

Props

PropTypeDefaultDescription
srcstring—Image URL; falls back to initials or custom content when it fails
altstring—Image alt text, used as the accessible name, takes precedence over name
namestring—User name, drives the initials fallback and a stable colour
size'xs' | 'sm' | 'md' | 'lg' | 'xl''md'Size: xs / sm / md / lg / xl, defaults to md
shape'circle' | 'square''circle'Shape: circle / square, defaults to circle
fit'cover' | 'contain''cover'Image fit: cover to fill and crop (default) / contain to inset the whole image, good for logos
status'online' | 'offline' | 'away' | 'busy'—Presence dot in the bottom-right corner
fallbackReactNode—Custom fallback content, takes precedence over the initials
AvatarGroup.maxnumber—Maximum avatars to show; the rest collapse into +N, all shown when omitted
...restHTMLAttributes—Remaining props are forwarded to the native span / div