The Avatar component is used to represent a user or a entity. It displays a picture or a fallback to initials.
View source codestring
The text to display whether src is not provided or src is not valid. The text will be truncated to one character. Random colors, based on the truncated text, will be assign automatically as background and text color.
AvatarBadgeProps
Whether the Avatar should contains a badge
string
className for the element
string
The fallback source to display when src is not provided or src is not valid. If defined, the Avatar component will not fallback on text initials.
"adjustments-horizontal" | "archive" | "arrow-down-tray" | "arrow-down" | "arrow-left-right" | "arrow-left" | "arrow-merge" | "arrow-path" | "arrow-pointing-out" | "arrow-right-rectangle" | "arrow-right" | "arrow-split" | "arrow-top-right-square" | "arrow-turn-right" | "arrow-up-tray" | "arrow-up" | ... 143 more ...
The name of the icon to display
boolean
Whether the Avatar src should be lazy loaded
Default: false16 | 24 | 32 | 40 | 56
Specifies the size of the element.
Default: 32string
The image URL
"circle" | "square"
Whether the Avatar should be square or circle
Default: circle