Avatar
An image element with a fallback for representing the user.
FO
Installation
npm i @huin-core/react-avatarAPI Reference
Avatar
| Prop | Type | Description |
|---|---|---|
| asChild | boolean | When set to true, renders the component as its child element, inheriting the child's styles and behavior. |
AvatarImage
| Prop | Type | Description |
|---|---|---|
| asChild | boolean | When set to true, renders the component as its child element, inheriting the child's styles and behavior. |
| onLoadingStatusChange | function | A callback providing information about the loading status of the image. This is useful in case you want to control more precisely what to render as the image is loading. |
AvatarFallback
| Prop | Type | Description |
|---|---|---|
| asChild | boolean | When set to true, renders the component as its child element, inheriting the child's styles and behavior. |
| delayMs | number | Useful for delaying rendering so it only appears for those with slower connections. |