AhaSlides Design
v0.52.0React · Vue · Lit

Components · Data Display

Avatar

Represent a person or entity with a photo, initials, or an icon — solo or in a stacked group.

Examples

Shape
Size
Content
Content · initials · photo · icon
Size · small 24 · default 40 · large 64
Shape · circle · square · color ground
Group · stacked with a +N overflow

API

PropTypeDefaultNotes
namestringFull name; initials are derived when no src/icon. Also the alt/aria-label
srcstringImage URL; the photo content mode (overrides icon/initials)
iconstringDS icon name (e.g. 'system-user'); the glyph content mode when no src
size'small' | 'default' | 'large' | numberdefault24 / 40 / 64 named steps, or any numeric px
shapecircle | squarecircleClip shape
colortoken nameGround tint — an --aha-* token suffix, e.g. 'bg-positive'
maxnumber(aha-avatar-group) collapse children past this count into a +N chip

Install

# .npmrc — once: point the @ahaslides-product scope at GitHub Packages
@ahaslides-product:registry=https://npm.pkg.github.com
//npm.pkg.github.com/:_authToken=${GITHUB_TOKEN}   # a GitHub token with read:packages

npm i @ahaslides-product/design
import '@ahaslides-product/design/tokens.css';   // once, at the app root
import '@ahaslides-product/design/aha-avatar';   // registers <aha-avatar>

Agent feed for this component (absolute, fetchable anywhere): avatar.agent.json · avatar.md · avatar.llms.txt

When to use

When to use
  • Avatar — identifying a person or entity — a presenter, a participant, an author
  • Icon — a generic symbol, not a specific identity
  • Tag — labelling with a category rather than an identity
Always provide `name` even when `src` is set — it becomes the alt text and the initials fallback if the image fails. Prefer initials or a photo over a generic icon for a real identity; reserve the icon mode for a placeholder/guest slot. In a group, keep sizes uniform and set `max` so the +N chip stays legible.
Surfaces
editor dashboard settings audience

Spec

Size small 24 · default 40 · large 64 (named), or any numeric px via `size` · Shape circle (pill radius) · square (radius 8) · Initials bg-accent #F9F5FF, purple-60 #6A1EBB, SemiBold 600 · Image object-fit cover, clipped to shape · Icon <aha-icon> glyph by name, ~half the avatar diameter, currentColor · Color ground tint from an --aha-* token via `color` (default brand tint) · Group stacked overlap (-10px), 2px container-white ring, +N chip past `max`