
Premium solid avatar with image loading, fallback delay, render composition, and state-aware styling.
npx shadcn@latest add https://ui.edbn.me/api/analytics/registry/avatar.jsonDisplays a profile image, initials, or fallback icon. Renders a span element and exposes image loading state.
classNamestring | functionCSS class name or state function receiving Avatar.Root.State.
styleReact.CSSProperties | functionInline style object or state function receiving Avatar.Root.State.
renderReactElement | functionCustom render element or render function for composition.
The avatar image. Renders an img element after it loads successfully.
srcstringImage URL
altstringAlt text
onLoadingStatusChange(status: ImageLoadingStatus) => voidCallback fired when the image loading status changes.
classNamestring | functionCSS class name or state function receiving Avatar.Image.State.
styleReact.CSSProperties | functionInline style object or state function receiving Avatar.Image.State.
renderReactElement | functionCustom render element or render function for composition.
Displayed when the image fails to load or no image is provided. Renders a span element.
delaynumberMilliseconds to wait before showing the fallback.
classNamestring | functionCSS class name or state function receiving Avatar.Fallback.State.
styleReact.CSSProperties | functionInline style object or state function receiving Avatar.Fallback.State.
renderReactElement | functionCustom render element or render function for composition.