- Blade Components
- Docs
- Components
- Avatar
Avatar
Image element, with a fallback, for graphically representing the user.
Usage
<x-avatar />
Component API
Attribute | Default | Description |
---|---|---|
src |
null |
string || null The image source. |
srcset |
null |
string || null The image source set, used for responsive images. |
alt |
null |
string || null The image alternate text. |
size |
null |
string || null Possible values null , xs , sm or lg . |
icon |
heroicon-o-user |
string || null |
Image
Show an image by supplying the src=""
attribute. Optionally add support for responsive images by supplying the srcset=""
attribute.
When showing an image it's good practice to supply the alt=""
attribute to specify an alternate text, if the image cannot be displayed.

Size
Control the avatar size by supplying the size=""
attribute.
Icon
You can control the icon per avatar instance by supplying the icon=""
attribute. Any blade-ui-kit/blade-icons compatible icon set can be used.