bit Bheadless

Avatar

An image element with a graceful fallback for representing a user or entity.

Implementation: CSS Tailwind

Basic

Compose BitBhAvatarImage with a BitBhAvatarFallback inside BitBhAvatar. The image is only shown once it loads successfully — until then the fallback initials are displayed.

CT

Fallback (broken image)

When the image fails to load (or no Src is given), the fallback is shown instead of a broken-image icon. Here the source is intentionally invalid.

JD

Delayed fallback

Set DelayMs on the fallback to wait before showing it. This avoids a flash of initials for images that load quickly. The fallback only appears if the image hasn't loaded by the time the delay elapses.

Sizes and shapes

The library ships zero styling, so size and shape are entirely up to your CSS. Override class per avatar for circles, squares, or stacked groups.

AB CD EF
An unhandled error has occurred. Reload 🗙