ArtificialSenseDocs

Docs / Components

SenseAvatarComponent

User avatar with image support, name-derived initials, configurable sizes and shapes from @artificialsenselabs/ui.

Live demo: run nx serve showcase and open /components/avatar (port 4202).

Overview

Category: Display. Selector: sense-avatar. Import: import { SenseAvatarComponent } from '@artificialsenselabs/ui';

<sense-avatar name="Ada Lovelace" />
<sense-avatar name="Ada Lovelace" image="/ada.png" />
<sense-avatar label="AL" />

Accessibility

  • Host uses role="img" with a resolved aria-label from ariaLabelnamelabelimageAlt → i18n.
  • Prefer name for people: it names the avatar for AT and derives visible initials when there is no image.
  • When image is set, the <img> uses empty alt so the host label is announced once (do not also put a second name on the image).
  • Visible text/icon content is aria-hidden; the host label is the accessible name.