Avatar

Profile picture, user initials or fallback icon.

This component is based on the div element and supports common margin props m, mx, my, ml, mr, mt, mb. View source

Contains all the parts of an avatar.

PropTypeDefault
srcstring
size"1" | "2" | "3" | "4""1"

Displays user initials or a fallback character when no image is available.

Use the size prop to control the size of the avatar.

When no image is provided, the avatar will display the text content.

You can use string methods to get the first character from a name for the avatar text.