Avatar

A profile image with an automatic initials fallback.
Stable
Web
iOS
Android
@advui/core
Source
JSX
<Avatar alt="Ada Lovelace" />
size
shape

Installation

pnpm
pnpm add @advui/core
npm
npm install @advui/core

Usage

import { Avatar } from '@advui/core'

<Avatar src={user.photoUrl} alt={user.name} />

Examples

Image with fallback

Sizes

Stacked group

API reference

Avatar

PropTypeDefaultDescription
srcstring—Image URL. The fallback shows until it loads or if it fails.
altstring—Accessible name — usually the person’s name.
fallbackstring—Custom fallback text. Defaults to initials derived from `alt`.
size'xs' | 'sm' | 'md' | 'lg' | 'xl''md'24–64px.
shape'circle' | 'square''circle'Outline shape.

Avatar.Image

The picture, when you compose the avatar yourself.
PropTypeDefaultDescription
src requiredstring—Image URL.

Avatar.Fallback

Shown until the image loads, or if it fails. Holds initials or an icon.

Accessibility

  • The avatar is a single img whose name is alt; the inner image and initials are hidden to avoid double announcements.
  • Omit alt (decorative) when the name is already visible next to the avatar.

Platform notes

Web
Uses a regular <img> with lazy decoding.
iOS
Remote images are cached by React Native’s image loader.
Android
Same as iOS; use HTTPS URLs.
Since v0.1.0Last updated Nov 2, 2026Edit this page on GitHub