Skip to content
Data Display

Avatar

A circular container for user profile images with automatic fallback support. Shows initials or placeholder content when the image is unavailable.

With Image

CN

Import

import {
  Avatar,
  AvatarFallback,
  AvatarImage,
} from "@mikenotthepope/substrateui"

Composition

Avatar
├── AvatarImage
└── AvatarFallback

Fallback Initials

JDAB

Custom Sizes

SMMDLGXL

API Reference

Avatar

PropTypeDefaultDescription
classNamestring—Additional CSS classes. Use to override the default h-10 w-10 sizing.

AvatarImage

PropTypeDefaultDescription
src
required
string—The image URL for the avatar.
alt
required
string—Accessible alt text for the avatar image.
classNamestring—Additional CSS classes for the image element.

AvatarFallback

PropTypeDefaultDescription
children
required
React.ReactNode—Fallback content shown while the image loads or when it fails. Typically initials.
classNamestring—Additional CSS classes for the fallback container.