Skip to content

Avatar

Display a user or entity avatar (image, initials, or icon) with optional presence dot and badge overlay.

HTML tag: c-e247d101dce6f42e8bd2be1f0c8cbbe49

  • user or entity profile image
  • initials fallback when no photo
  • presence or count badge on a person/entity
PropTypeDefaultDescription
srcstring
initialsstring
iconstring
sizestringmd
presencestringnone
interactiveboolean
altstring
labelstring
shapestringcircle
fitstringcover
badgestring
disabledboolean
loadingstringlazy
fallback_strategystringinitials
seed_colorstring
aria_labelstring
densitystringcomfortable
presence_positionstringbr
presence_variantstringdot
badge_positionstringtr
badge_variantstringpill
badge_anchorstringinside
  • Prefer .src for photo; use .initials or .icon when no image.
  • Set .aria_label when interactive or image-only.
  • Use .size (xs–lg) and .shape (circle | rounded | square) for layout fit.
  • .presence and .badge are decorative indicators, not buttons.
SignatureDescription
refresh()

Do not use ab-avatar for generic icons without a person/entity context — use ab-icon. Do not rely on badge text for critical status — use ab-status-chip for workflow status.

<c-e247d101dce6f42e8bd2be1f0c8cbbe49 .src=${user.photo} .initials=${user.initials} .size=${'md'} .presence=${'online'} .interactive=${true} @avatar-click=${openProfile}></c-e247d101dce6f42e8bd2be1f0c8cbbe49>