Browse the docs
Display / Avatar

Avatar

Doodle faces generated from a name, so the same person always gets the same face. Real photos can drop in too.

Server ComponentWCAG AASince v0.1

Change every prop live in the playground.

Props

Avatar

PropTypeDefaultWhat it does
name requiredstring—The person's name. Picks their doodle face and becomes the accessible name.
classNamestringnone—
size"sm" | "md" | "lg" | "xl"mdFace size: sm 36px, md 52px, lg 76px, xl 86px.
srcstringnoneA photo URL; replaces the doodle.
status"online" | "busy" | "offline"noneA status dot. Its meaning is added to the accessible name ("Jun Reyes, online").
statusLabelstringonline / busy / offlineWords for the status, e.g. "on a call".
tiltnumber0Rotation in degrees.

AvatarStack

PropTypeDefaultWhat it does
names requiredstring[]—Avatars to show (decorative inside the stack; the stack carries the name).
childrenReactNodenone—
classNamestringnone—
labelstring"Rosa, Jun, Ana and 4 more"Accessible name.
maxnumber3How many faces to show before "+N".

Use it well

DoPass the person's real name, so the face and the accessible name match.
Don'tRely on the status dot alone. Its meaning is part of the name for a reason.

Accessibility

  • role="img" named after the person; the status joins the name ("Jun Reyes, online").
  • Stacks are named "Rosa, Jun, Ana and 4 more".
Five stamps!

All aboard.

You took the whole tour. Here's Holo Pip, a foil sticker for riders who finish. It's in your playground tray now, for good.