Skip to content

Avatar

SAvatar is a user avatar built on Reka UI: it shows an image, and when there is none or it fails to load, a fallback (usually initials). It supports sizes.

Sizes (fallback initials)

AJMGDS

With an image

API

Props

NameTypeDefaultDescription
srcstringundefinedImage URL. If it fails to load, the fallback is shown.
altstringundefinedAlternative text of the image.
fallbackstringundefinedFallback content (usually initials) shown when there is no image.
size"md" | "sm" | "lg""md"Size: sm/md/lg.
delay-msnumberundefinedDelay before showing the fallback, ms (avoids flicker when the image loads fast).

Slots

NameDescription
defaultFallback content (an alternative to the fallback prop).