docs / core / avatar

Avatar

a person, as an image or their initials.

intensity · recedesrsc · client

provenance

shaped from sisu-plus

layer

core / primitives

intensity

recedes · safe anywhere, including dense surfaces

composition

sits in EntityCard, comment rows, nav account cornersstacks into AvatarGroup for social proofnever a click target on its own. wrap it in a link or buttonnot for logos or icons. it is a person

a11y

alt names the image · the status dot is aria-hiddenjest-axe

dependencies

@base-ui/react · class-variance-authority
live demo · try it out
JD
customize
sizediameter and initials size
tonefallback fill
statuspresence dot in the corner
imageoff shows the fallback initials
altthe person's accessible name
fallbackinitials shown without an image
usagecopy
import { Avatar } from "@usva-ui/react/primitives/avatar";

<Avatar src="/jane.png" alt="Jane Doe" fallback="JD" status="online" />

props

proptypedefaultnotes
srcstringimage source. omit it and the fallback shows.
altstringthe person's name. required, it is the accessible name of the image.
fallbackstringinitials shown while the image loads, errors, or is missing.
size"sm" | "md" | "lg""md"diameter and initials size.
status"online" | "away" | "busy" | "offline"a presence dot in the corner. online pulses.
tone"solid" | "accent" | "neutral""solid"fallback fill: solid accent, tinted accent, or neutral surface.

get it

bun add @usva-ui/reactcopy
usagecopy
import { Avatar } from "@usva-ui/react/primitives/avatar";

<Avatar src="/jane.png" alt="Jane Doe" fallback="JD" />
<Avatar alt="Ada Lovelace" fallback="AL" status="online" />