Avatar
The ArcadiaAvatar component shows a user’s profile image or falls back to auto-generated initials derived from the Name parameter.
Basic Usage
<ArcadiaAvatar Name="Jane Doe" Src="/images/jane.jpg" />
<ArcadiaAvatar Name="John Smith" Size="lg" Color="success" />
<ArcadiaAvatar Size="sm" />
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
Name | string? | null | The user’s display name. Used to generate initials when no image is provided. |
Src | string? | null | The image URL for the avatar. |
Size | string | "md" | Avatar size: "sm", "md", "lg". |
Color | string | "primary" | Background color for the initials avatar: "primary", "success", "danger", "warning". |
Class | string? | null | Additional CSS class names. |
Style | string? | null | Inline CSS styles. |
Accessibility
- Uses
role="img"on the root element. - Provides
aria-labelbased on theNameparameter (e.g., “Avatar for Jane Doe”) or “User avatar” as a fallback. - The
<img>element includes analtattribute derived fromName. - On image load error, the component falls back to initials automatically.