Avatar
Display user images, initials, or icons for visual identification.
Import
Basic Usage
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| src | string | - | Image source URL |
| alt | string | '' | Alt text for the image |
| initials | string | - | Initials to display when no image is provided or image fails to load |
| size | 'small' | 'medium' | 'large' | 'medium' | Size variant |
| href | string | - | Optional link URL - renders as anchor when provided |
| target | string | - | Link target (e.g., "_blank") |
| className | string | - | Additional CSS class names |
Variants
With Image
With Initials Fallback
JDABXY
As a Link
Size Variants
SMMDLG
Avatar Group
AB
CD
EF
GH
+3
Image with Fallback
When the image fails to load, initials are displayed:
(Image fails, shows initials fallback)