Avatar
An image element representing the user. This component contains a fallback state and a group state. The fallback state can be used to display the user’s initials when an image is not available. The group state can be used to display multiple avatars in a group.
API DocumentationImport
Usage
With Image
Use the Avatar.Image
component to display an image avatar.
With Initials
Use the Avatar.Fallback
component to display the user’s initials when an image is not available.
With Fallback Icon
Use the Avatar.Fallback
component to display a fallback icon when an image is not available.
Group
You limit the number of avatars to be displayed in a group by using the maxLimit
prop.
Props
API Interface: AvatarProps
- size?
-
"xs"
"sm"
"md"
"lg"
"xl"
The size of the fallback avatar.
Default:
md
API Interface: AvatarFallbackProps
- maxLimit?
-
number
The maximum number of avatars to display.
API Interface: AvatarGroupProps
- size?
-
"xs"
"sm"
"md"
"lg"
"xl"
The size of the image avatar.
Default:
md
API Interface: AvatarImageProps