AhaSlides Design
v0.52.0React · Vue · Lit

Components · Data Display

User info

A person/identity row — an avatar next to a name, with an optional email underneath.

Examples

Size
Email
Default · avatar + name + email (40px avatar)
Compact · name only (24px avatar) — no email, or size="compact"

API

PropTypeDefaultNotes
namestringThe person's full name — rendered as text, and passed to the avatar for initials/alt
emailstringOptional email; when present (and not compact) it renders under the name in the default layout
srcstringAvatar image URL; falls through to initials of `name` when absent
size'default' | 'compact'default'default' → 40px avatar + email row; 'compact' → 24px avatar + name only. Omitting `email` implies compact

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-user-info';   // registers <aha-user-info>

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

When to use

When to use
  • User info — showing a person's identity as a row — avatar + name (+ email): a member list, an author byline, an account switcher
  • Avatar — just the picture/initials with no name text beside it
  • Descriptions — a labelled field grid about an entity, not a compact identity row
Always provide `name` — it's both the visible label and the avatar's initials/alt. Reach for User info over a plain Avatar whenever the name (and email) belong next to the face; reach for the bare Avatar when only the picture is wanted. Omit `email` (or set size="compact") for a tight one-line identity in menus and dense lists.
Surfaces
dashboard settings editor audience

Spec

Layout avatar + (name over email) · gap 8 · Name 14px · SemiBold 600 · text-default #1A1A1A · Email 12px · Regular 400 · text-secondary #8A8A8A · Avatar 40 when email shown · 24 name-only (reuses <aha-avatar>) · Compact size="compact" (or no email) → 24px avatar + name only