Avatar
An image element with a fallback for representing the user.
With Initials Fallback
Use the
initials
prop to display fallback text when no image is provided or if the image fails to load.
Sizes
Use the
size
prop to change the avatar size.
Shapes
Use the
shape
prop to switch between circle and square avatars.
Custom Fallback Icon
Use the
:fallback
slot for custom fallback content like icons.
Avatar Group
avatar_group
stacks faces and shows "+n" beyond
max
. Faces are parted by a ring in the background colour.
It is one
role="group"
named by
label
and every name; each face shows its name as a tooltip.
Presence
status
(
"online"
,
"away"
,
"offline"
)
adds a small dot cut into the avatar's edge. The dot is decorative and the status is also a screen-reader word, never colour alone.
In an
avatar_group
give each person a
:status
; the group's own name lists every status.
Image fallback
An image that fails to load falls back to the initials from a small hook. Give the avatar an
id
(and
nonce
under a strict CSP); without an
id
there is no image-failed fallback.