Skip to content

BbAvatar

Display a person or entity with an image, a named fallback, and predictable loading behavior.

import { BbAvatar } from 'bitboss-ui';

On this page

Use it for

Use BbAvatar for a person's or entity's visual identity in member lists, activity feeds, and assignee cells. It is display-only.

Use something else when

  • BbIndicator — status or a count belongs on the avatar
  • BbDropdown — the avatar opens an account menu
  • BbIcon — the mark represents no person or entity

Pass Through

Hover or tap a part to outline it. Toggles flip loading, errors and warnings when the component has them — only parts highlight.

Marta Villoresi

Show a member

Pass the photo and a meaningful alt; keep initials in the default slot so the same row survives a missing or failed image.

Marta Villoresi
Marta VilloresiHead of Product

The fallback order is image, default slot, then the built-in person icon. On a fallback, alt becomes the accessible name. Leave it empty only when the avatar is decorative.

Marta Villoresi
photo
IB
slot
built-in
Idris Bello
failed photo

size accepts the shared xs2xl scale, pixels, or a CSS length. The image is always center-cropped into a circle; there is no square variant.

Presence and groups

Compose status and overflow around the avatar instead of turning the avatar into an interactive control.

  • Marta VilloresiMarta VilloresiHead of Product · Online
  • Lukas BrandtLukas BrandtEngineering Manager · Away
  • Sofia MarchettiSofia MarchettiDesign Lead · Online
  • Amara OkonkwoAmara OkonkwoStaff Engineer · Away
Reviewers
Marta VilloresiLukas BrandtSofia MarchettiAmara Okonkwo +2

A presence dot is silent, so repeat the status in text. Wrap a clickable avatar in a real button, link, or dropdown trigger; BbAvatar emits no events.

Slow images and SSR

The component checks the image timeout milliseconds after mount (400 by default) to recover events missed before hydration. A late image can still replace the fallback.

vue
<BbAvatar :src="member.photo" :alt="member.name" :timeout="4000" />

Raise the deadline for a slow origin. Use srcset with sizes for responsive sources; both pass through to the underlying image.

Interaction and color

For a bot or service account, place an unlabeled BbIcon in the fallback slot and keep the actor's name in alt.

The fallback uses --bb-primary and --bb-primary-fg. For a per-tenant color, set both local values on the avatar:

vue
<BbAvatar alt="Acme Bot" :style="{ '--bg': tenant.color, '--fg': tenant.foreground }">
    AB
</BbAvatar>
Coming from v2color → tokens

The color prop was removed. Retheme the primary pair for product-wide color, or use --bg and --fg for one instance.