Fallback
Use a fallback when an image fails to load or is unavailable.
SK
SK
Filter
Apply SVG Filters to avatar images.
API Reference
Root
| Property | Default | Type |
|---|---|---|
onStatusChange | - | ((details: StatusChangeDetails) => void) | undefinedFunctional called when the image loading status changes. |
ids | - | Partial<{ root: string; image: string; fallback: string; }> | undefined The ids of the elements in the avatar. Useful for composition. |
getRootNode | - | (() => ShadowRoot | Node | Document) | undefinedA root node to correctly resolve document in custom environments. E.x.: Iframes, Electron. |
dir | "ltr" | "ltr" | "rtl" | undefinedThe document's text/writing direction. |
element | - | Snippet<[HTMLAttributes<"div">]> | undefinedRender the element yourself |
RootProvider
| Property | Default | Type |
|---|---|---|
value | - | () => AvatarApi<PropTypes> |
element | - | Snippet<[HTMLAttributes<"div">]> | undefinedRender the element yourself |
RootContext
| Property | Default | Type |
|---|---|---|
children | - | Snippet<[() => AvatarApi<PropTypes>]> |
Image
| Property | Default | Type |
|---|---|---|
element | - | Snippet<[HTMLAttributes<"img">]> | undefinedRender the element yourself |
Fallback
| Property | Default | Type |
|---|---|---|
element | - | Snippet<[HTMLAttributes<"span">]> | undefinedRender the element yourself |