Avatar

An image, the initials of a name, or a placeholder icon.

Source on GitHub

Code

API

For AI agents: this API as Markdown, or every component in llms-full.txt.

<ray-avatar> · RayAvatar

PropertyAttributeTypeDefaultDescription
srcsrc reflectsstringImage URL; falls back to initials if it fails to load.
altalt reflectsstringAccessible name (default: name).
namename reflectsstringPerson or entity name; its initials are shown without an image.
colorcolorstringA palette color or any CSS color.
variantvariant reflectslight | filled | outline | defaultlightStyle of the initials/placeholder.
sizesize reflectsxs | sm | md | lg | xlmdDiameter.
radiusradiusxs | sm | md | lg | xl | fullCorner radius. Default: full.
SlotDescription
(default)Custom content (e.g. an icon) instead of initials.
PartDescription
avatarThe box.
imageThe <img>.