01
Overview
Displays a user's profile photo, initials, or fallback icon at a consistent size.
Usage
02
When to use
Use when
- Representing a person or account next to their name or activity.
- Displaying initials when no avatar image is available.
Avoid when
- Showing a small status or count indicator — use badge or status-dot instead.
03
Examples
Basic avatar
Image variant alongside an initials fallback.
Avatar shapes
Circle and square shape variants.
Avatar sizes
xs, sm, md, lg, and xl size tokens.
04
Props
| Name | Type | Default | Required | Bindable | Description |
|---|---|---|---|---|---|
src | text | Image source. When omitted, the initials fallback renders. | |||
alt | text | Alternative text for the image. Defaults to name when present. | |||
name | text | Display name used to compute initials when no image is available.
Also used as the default alt for the image. | |||
size | 'xs''sm''md''lg''xl' | 'md' | Size token. Default md. | ||
shape | 'circle' | 'square' | 'circle' | Shape. Default circle. |