AppAvatar

A picture of a person or a team, with initials on a tinted disc when there is no picture or it fails to load. The tint comes from the name (or a seed you pass), with the same hash and the same eight hues as AdvancedAppTable's identity column, so a person keeps one colour everywhere; initials stay at 4.5:1 on their tint in all six preset and theme combinations. The avatar is one image to screen readers, named by name and status ("Ada Lovelace, Online"). The optional status dot has a shape for each state as well as a colour: online a disc, away a crescent, busy a bar, offline a ring.

Install: pnpm add-component AppAvatar

Hover for the name

tooltip shows the name and the status word in an AppTooltip ("Grace Hopper, Busy"); it flips when its side has no room. For a row of faces, use AppAvatarGroup: it reveals each name with the blob.

Pictures and initials

A photo; initials (two letters from the first and last word, or one); a picture that fails to load falls back to initials; non-Latin names keep their letters; no name shows a person glyph.

Sizes and shapes

Status

The name is written beside each avatar, so alt is '' and screen readers hear the status alone. The dot sits on a ring cut in --vt-avatar-cut (default --color-surface); set it to the colour behind the avatar.

API