Display and feedback · stable · MIT

Avatar

Image, fallback, group, and named presence status.

Install editable source

Add Avatar

Base UI / canonicalnpx shadcn@latest add https://gummyui.dev/r/gummy-avatar.json

No package dependency beyond React. Shared Gummy material is resolved automatically.

Behavior contract

Semantics before surface

Semantics

Images retain alt text; fallbacks and status names remain explicit.

Keyboard

No component-specific keys.

System support

Light and dark themes, logical RTL layout, reduced motion, responsive content, and forwarded public refs.

Source-derived reference

Anatomy and public API

Exported anatomy

These public React parts are read directly from the canonical source during the documentation build.

  • GummyAvatar
  • GummyAvatarGroup

Prop contracts

GummyAvatarGroupProps

Composes React.HTMLAttributes<HTMLDivElement> & { label: string; }

GummyAvatarProps

Composes React.HTMLAttributes<HTMLSpanElement> & { src?: string; alt?: string; fallback: React.ReactNode; size?: "small" | "medium" | "large"; status?: "online" | "busy" | "away" | "offline"; statusLabel?: string; }

Troubleshooting

Check behavior before surface.

Implementation decisions

When to use Avatar

Use an avatar as supporting identity, never as the only way to distinguish a person or organisation. Keep the visible name nearby and define a stable fallback for missing, blocked, or undecodable images. Decide whether the image itself needs alternative text or whether adjacent text already supplies the name. Test long international names, duplicate initials, slow images, privacy-restricted accounts, and high-density group layouts.

Live product source

Inspect the canonical states

The Component Lab exercises real source across default, focus, disabled, responsive, dark, reduced-motion, and RTL contexts.

Open the live Component Lab

Interactive inspection

Try Avatar in context

Load the real component preview when you are ready to interact with its responsive, theme, and direction controls.

Editable source

Read before you install

Canonical Base UI or native source

The registry payload stays off the initial page request.