Avatar

The Avatar component displays a thumbnail image representing a user or entity. When no image source is provided, it shows a default avatar illustration.

JD
avatar

Props

NameDefaultType
sizems m l number
The size of the avatar. Can be a predefined size or custom number
radiuspillxs s m l pill number
The roundness of the avatar. The default is a circle
urlstring
URL of the avatar image to display
fallbackstring
Text to show when the image fails to load
altavatarstring
Alt text for the avatar image

Slots

NameAcceptsDescription
defaultanyContent to display inside the avatar (e.g. initials or text). Takes priority over url and icon
iconanyCustom icon to show as the fallback when no url or default slot content is provided
overlayanyContent rendered as an absolute overlay on top of the avatar (e.g. an Indicator or action button)