Avatar
An image element with a fallback for representing the user.
Anatomy
Usage
Avatar.Composed Props
Composed Avatar component that combines Root, Image, and Fallback Provides a complete avatar solution with image and fallback handling
| Prop | Type | Default |
|---|---|---|
src | string | — |
alt | string | — |
fallback | any | — |
imageProps | see more | "{}" |
fallbackProps | any | "{}" |
className | string | — |
children | ReactNode | — |
asChild | boolean | — |
Avatar.Root Props
Root component for the Avatar system Provides context and styling for Avatar subcomponents
| Prop | Type | Default |
|---|---|---|
className | string | — |
children | ReactNode | — |
asChild | boolean | — |
Avatar.Fallback Props
Fallback component for the Avatar Displayed when the main image fails to load
| Prop | Type | Default |
|---|
Avatar.Image Props
Image component for the Avatar Displays the main avatar image with proper sizing and aspect ratio
| Prop | Type | Default |
|---|---|---|
onLoadingStatusChange | function | — |
className | string | — |
children | ReactNode | — |
asChild | boolean | — |