A person's picture or initials, with an optional presence dot.
A Markdown brief for Claude, Cursor or v0: install, setup, props and a complete example.
For a person: their photo, or initials when there is none.
Named by the person’s name. A presence dot is announced as part of that name, not by color alone.
import { Avatar } from '@idyeah/diya'Stable since 1.0.0
nameRequiredstringThe person's name: the avatar's accessible name, and the source of the visible initials (first letters of the first two words).
shape"circle" | "rounded"'circle' or a rounded square. Defaults to 'circle'.
Default 'circle'
size"small" | "medium" | "large"Avatar diameter. Defaults to 'medium'.
Default 'medium'
srcstringImage URL; if it fails to load, the initials show instead, or a person icon when name is empty.
status"online" | "away" | "busy"Shows a presence dot and adds the status to the accessible name.
Also takes every native <span> attribute, such as id, aria-* or data-*.