Avatar
A person's photo, or their initials when there is none, with an optional presence dot.
Stability: experimental
Props
| Prop | Type | Default | Means |
|---|---|---|---|
name | string | The person's name: the initials and the accessible name. | |
src | string | The photo's address. | |
size | "sm" | "md" | "lg" | "xl" | md | 28, 40, 56 or 80 pixels. |
status | "online" | "away" | "offline" | A presence dot at the bottom right. |
States
| State | Looks like |
|---|---|
photo | The photo, cropped to a circle. |
initials | Up to two initials on a primary tint. |
Accessibility
| role | img |
| name | The name prop (the photo's alt text, or the initials' label). |
| focus | Never focused. |
Theme tokens
color.primary color.surface color.success color.danger color.muted radius.full
Example
<Avatar name="Ada Lovelace" status="online" />