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
classNamestringAdditional CSS classes. Use to override the default h-10 w-10 sizing.

AvatarImage

PropTypeDefaultDescription
src
required
stringThe image URL for the avatar.
alt
required
stringAccessible alt text for the avatar image.
classNamestringAdditional CSS classes for the image element.

AvatarFallback

PropTypeDefaultDescription
children
required
React.ReactNodeFallback content shown while the image loads or when it fails. Typically initials.
classNamestringAdditional CSS classes for the fallback container.