Skip to content

BbAvatar

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

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, when status or a count belongs on the avatar
  • BbDropdown, when the avatar opens an account menu
  • BbIcon, when the mark represents no person or entity

Passthrough

Hover or tap a part to outline it. The toggles turn on loading, errors and warnings where the component has them; only parts get a row.

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.

xssmmdlgxl2xl
PhotoMarta VilloresiMarta VilloresiMarta VilloresiMarta VilloresiMarta VilloresiMarta Villoresi
Initials (slot)IBIBIBIBIBIB
No slot
Failed photoIdris BelloIdris BelloIdris BelloIdris BelloIdris BelloIdris Bello

size accepts the shared xs–2xl 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.

  • Ingrid HalvorsenIngrid HalvorsenFinancial Analyst · Online
  • Chiara BonettiChiara BonettiContent Strategist · Away
  • IBIdris BelloFrontend Engineer · Online
  • RHRania HaddadSupport Manager · Away
  • Engineering8 members
    Lukas BrandtAmara OkonkwoHugo FerreiraIB +4
  • Design4 members
    Sofia MarchettiYuki TanakaEYZA
  • Product3 members
    Marta VilloresiNRMC

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.fullName" :timeout="4000">
    {{ member.initials }}
</BbAvatar>

Raise it for a slow origin, so readers do not see the initials flip to the photo. Use srcset with sizes for responsive sources; both pass through to the underlying image.

Bots and custom colour

For a bot or service account, place an unlabeled BbIcon in the fallback slot and keep the actor's name in alt. The fallback paints with --bb-primary and --bb-primary-fg; for a colour that comes from data, such as a workspace's own, set --bg and --fg on the avatar.

Release activity

  • Release bot deployed v2.14.0 to production2 minutes ago
  • Lukas BrandtLukas Brandt approved the release14 minutes ago
  • LOLumen Outdoor workspace switched to the new build1 hour ago
Coming from v2color → tokens

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