Avatar
An image element with a fallback for representing the user.
With Fallback
Avatar showing initials when no image is available.
JDABCN
Sizes
Available avatar sizes.
SML
Usage
julia
using Suite
Avatar(
AvatarImage(src="/avatar.jpg", alt="User"),
AvatarFallback("JD"),
)
Avatar(size="lg",
AvatarFallback("AB"),
)API Reference
Avatar
| Prop | Type | Default | Description |
|---|---|---|---|
| size | String | "default" | default | sm | lg |
| class | String | "" | Additional CSS classes |
| children... | Any | - | AvatarImage and/or AvatarFallback |
| kwargs... | Pair | - | Any HTML attribute |
AvatarImage
| Prop | Type | Default | Description |
|---|---|---|---|
| src | String | "" | Image URL |
| alt | String | "" | Alt text for accessibility |
| class | String | "" | Additional CSS classes |
| kwargs... | Pair | - | Any HTML attribute |
AvatarFallback
| Prop | Type | Default | Description |
|---|---|---|---|
| class | String | "" | Additional CSS classes |
| children... | Any | - | Fallback content (initials, icon) |
| kwargs... | Pair | - | Any HTML attribute |