avatar() renders a circular profile image with automatic initials fallback when no src image is provided or if the image fails to load.
avatar()
src
<ComponentPreview title="Avatar Sizes & Fallbacks">
{
"type": "columns",
"children": [
{"type": "avatar", "name": "Ada Lovelace", "size": "sm"},
{"type": "avatar", "name": "Grace Hopper", "size": "md"},
{"type": "avatar", "name": "Alan Turing", "size": "lg"},
{"type": "avatar", "name": "Research Agent", "fallback": "AI", "size": "md"}
]
}
</ComponentPreview>
<Tabs>
<Tab title="Python">
</Tab>
<Tab title="YAML">
</Tabs>
| Parameter | Type | Description |
|---|---|---|
| src | str | Optional image URL. |
str
| name | str | Accessible label and source for automatic initials. |
name
| fallback | str | Explicit fallback initials (e.g. "AI"). |
fallback
"AI"
| size | str | "sm", "md" (default), or "lg". |
size
"sm"
"md"
"lg"