Duolith docs

Avatar

A person's photo, or their initials when there is none, with an optional presence dot.

Stability: experimental

Props

PropTypeDefaultMeans
namestringThe person's name: the initials and the accessible name.
srcstringThe photo's address.
size"sm" | "md" | "lg" | "xl"md28, 40, 56 or 80 pixels.
status"online" | "away" | "offline"A presence dot at the bottom right.

States

StateLooks like
photoThe photo, cropped to a circle.
initialsUp to two initials on a primary tint.

Accessibility

roleimg
nameThe name prop (the photo's alt text, or the initials' label).
focusNever focused.

Theme tokens

color.primary color.surface color.success color.danger color.muted radius.full

Example

<Avatar name="Ada Lovelace" status="online" />