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 resolvedaria-labelfromariaLabel→name→label→imageAlt→ i18n. - Prefer
namefor people: it names the avatar for AT and derives visible initials when there is no image. - When
imageis set, the<img>uses emptyaltso 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.