Avatar

A named image or initials fallback, alone or in a labeled group.

An image and labeled initials in the three supported sizes.

Open in new tab

Each preview is its own Live page in a frame, because this site is a Vue 3.5 app built on the Pulsar starter kit. An open list or popover stays inside its frame; in your application it opens over the page.

Installation

bash
suprnova live:add avatar

Usage

html
{% import "suprnova-ui/avatar/avatar.html" as avatar %}
{% call avatar::avatar("Ada Lovelace", "AL") %}{% endcall %}

Examples

Team group

A named list keeps each team member accessible.

Open in new tab

Keyboard and accessibility

suprnova.avatar - a person's image or their initials (DATA-002). An image avatar names the person in alt; the initials fallback is an img role with the name as its label, so the identity survives a missing image. A group is a labeled list of avatars.

API reference

avatar

ParameterDefaultDescription
nameRequiredThe person named by image alt text or the initials label.
initialsRequiredThe text fallback when no image URL is supplied.
src""The image URL; empty renders initials.
size"md"The avatar size: sm, md or lg.

avatar_group

ParameterDefaultDescription
labelRequiredThe accessible name of the avatar list.

avatar_member

ParameterDefaultDescription
nameRequiredThe person named by image alt text or the initials label.
initialsRequiredThe text fallback when no image URL is supplied.
src""The image URL; empty renders initials.
size"md"The avatar size: sm, md or lg.