Avatar
Show a user’s profile image or initials in a compact, visual element.
Anchor to propertiesProperties
string
An alternative text that describes the avatar for the reader to understand what it is about or identify the user the avatar belongs to.
Anchor to initials
initials
string
Initials to display in the avatar.
Anchor to size
size
"small" | "small-200" | "base" | "large" | "large-200"
Size of the avatar.
string
The URL or path to the image.
Initials will be rendered as a fallback if src
is not provided, fails to load or does not load quickly
Was this section helpful?
Anchor to eventsEvents
Learn more about registering events.
Anchor to error
error
OnErrorEventHandler
Anchor to load
load
<typeof tagName> | null
Was this section helpful?
Code
<s-avatar
alt="John Doe"
initials="JD"
></s-avatar>