Skip to main content
The Avatar component displays user profile pictures with automatic fallback to initials or placeholder content.

Installation

Usage

Components

Avatar (Root)

string
Additional CSS classes.
The container for the avatar image and fallback.

AvatarImage

string
required
Image source URL.
string
required
Alternative text for the image.
function
Callback when loading status changes.
The avatar image. Shows fallback if image fails to load.

AvatarFallback

string
Additional CSS classes.
Displayed when the image is loading or fails to load.

Examples

Basic Avatar

Avatar Group

Custom Size

Fallback Only

Accessibility

  • Built on @base-ui/react for accessibility
  • Requires alt text on images
  • Automatic fallback when image fails
  • Proper semantic HTML