Avatar

An image element with a fallback for representing the user.

Default
User

With Initials Fallback

Use the initials prop to display fallback text when no image is provided or if the image fails to load.

Initials
JD AB ZK

Sizes

Use the size prop to change the avatar size.

Sizes
User sm
User md
User lg
User xl

Shapes

Use the shape prop to switch between circle and square avatars.

Shapes
User circle
User square

Custom Fallback Icon

Use the :fallback slot for custom fallback content like icons.

Custom Fallback

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.

Avatar Group
AR VN MI
AR VN MI RS DM
AR VN

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.

Presence
Online user online JD away AB offline
AR VN MI

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.

Are you sure?