Avatar
An image, the initials of a name, or a placeholder icon.
API
For AI agents: this API as Markdown, or every component in llms-full.txt.
<ray-avatar> · RayAvatar
| Property | Attribute | Type | Default | Description |
|---|---|---|---|---|
src | src reflects | string | Image URL; falls back to initials if it fails to load. | |
alt | alt reflects | string | Accessible name (default: name). | |
name | name reflects | string | Person or entity name; its initials are shown without an image. | |
color | color | string | A palette color or any CSS color. | |
variant | variant reflects | light | filled | outline | default | light | Style of the initials/placeholder. |
size | size reflects | xs | sm | md | lg | xl | md | Diameter. |
radius | radius | xs | sm | md | lg | xl | full | Corner radius. Default: full. |
| Slot | Description |
|---|---|
| (default) | Custom content (e.g. an icon) instead of initials. |
| Part | Description |
|---|---|
avatar | The box. |
image | The <img>. |