edbnedbn/ui
ComponentsMapsAudioPDF
GitHub stars
Explorer
Get Started
Components

Avatar

Composable avatar with image support and fallback initials.

Componentsdocsbase-ui/avatar

Installation

npx shadcn@latest add https://ui.edbn.me/r/avatar.json

Manual

API Reference

Root

Displays a user avatar image with an automatic fallback. Renders a span element.

classNamestring | function

CSS class name

renderReactElement | function

Custom render function

Image

The avatar image. Renders an img element.

srcstring

Image URL

altstring

Alt text

classNamestring | function

CSS class name

renderReactElement | function

Custom render function

Fallback

Displayed when the image fails to load or is not provided. Renders a span element.

classNamestring | function

CSS class name

renderReactElement | function

Custom render function