Avatar - Keep React

The Avatar component in the Keep React allows you to display user avatars or profile images in a consistent and visually appealing manner. With customizable options for placeholders, shapes, status icons, and sizes, you can create versatile avatars to suit your design needs.

Table of Contents#

Default Avatar#

When you enable the placeholder option, a default avatar image appears when there's no user image available.

Avatar Shapes#

Choose from three different avatar shapes: round, round square, or square. Just use the shape prop with values: "circle", "rounded", or "square".

Avatar Sizes#

There are various avatar sizes to fit your design. To change the size, use the size prop with values: xs, sm, md, lg, xl, or 2xl.

Using User Images#

Instead of an icon, you can display a user's image. Use the img prop and provide the path to the user's image, whether it's a local or remote URL.

Avatar Status#

The avatar's status reflects the user's availability. You can show the user's status using the status prop with values: online, offline, away, or busy. You can also customize the status position with the statusPosition prop, which accepts values: bottom-left, bottom-right, top-left, or top-right.

Avatar Notifications#

You can use the avatar to indicate notifications for the user. Use the status prop with values: "online", "offline", "away", or "busy" and set the statusType prop to notification to display notification indicators.

99
99
99
99

API Reference#

For detailed information about all the props and options, refer to the API section below.

PropertyDescriptionTypeDefault
altAlternative text for the avatar image.stringavatar
borderedDetermines if the avatar has a border.booleanfalse
imgPath to the user's imagestring/avatar.png
sizeSpecifies the size of the avatar
xs
sm
md
lg
xl
2xl
md
shapeThe shape of the avatar.
circle
rounded
square
square
stackedSpecifies if avatars should be stacked together.booleanfalse
statusReflects the user's availability status.
away
busy
offline
online
None
statusTypeSpecifies the type of status
dot
notification
None
statusPositionSpecifies the position of the status indicator.
bottom-left
bottom-right
top-left
top-right
bottom-right
totalNotificationTotal number of notificationsnumber99