Avatar
An easily stylable avatar component.
LTLT
API reference
Import the component and assemble its parts:
Anatomy
import { Avatar } from '@base-ui-components/react/avatar';
<Avatar.Root>
<Avatar.Image src="" />
<Avatar.Fallback>LT</Avatar.Fallback>
</Avatar.Root>
Root
Displays a user's profile picture, initials, or fallback icon.
Renders a <span>
element.
Prop | Type | Default | |
---|---|---|---|
className |
|
| |
render |
|
|
Image
The image to be displayed in the avatar.
Renders an <img>
element.
Prop | Type | Default | |
---|---|---|---|
onLoadingStatusChange |
|
| |
className |
|
| |
render |
|
|
Fallback
Rendered when the image fails to load or when no image is provided.
Renders a <span>
element.
Prop | Type | Default | |
---|---|---|---|
delay |
|
| |
className |
|
| |
render |
|
|