GitHub

Avatar

An image element with a fallback for representing the user.

VV
CN
VV
SA
PV
+2

Installation

Usage

Sizes

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

Small

VV

Large

VV

Examples

Custom Size

If you want to use a custom size, you can use the className prop to set the size.

VV

Avatar Group

Use the <AvatarGroup /> to add a group of avatars.

VV
SA
PV
IA

Custom Colors

You can customize the avatar fallback colors using the className prop.

IN
PK
SK
PR
AM
EM

With Status

Use <AvatarBadge /> to show status indicators on avatars.

VV
SA
PV

Fallback Only

You can use just the <AvatarFallback /> to display a icon or text.

VV
SA
PV
SA
CN

Fallback with Icon

Use an icon inside <AvatarFallback /> when you have no image or initials.

Avatar Group Count

Use <AvatarGroupCount /> to add a count to the group.

VV
SA
PV
IA
+5

Avatar Group Count Icon

You can also add an icon to the <AvatarGroupCount />

VV
SA
PV
IA

Avatar with Popover

You can use with the <Popover> to add show more information.

VV
SA
PV
IA

Avatar with Hover Card

You can use with the <HoverCard> to show user information on hover.

API Reference

Avatar

Root element of the avatar. Renders a div

AvatarImage

Image element for the avatar. Renders an img

AvatarFallback

Fallback content displayed when the image fails to load. Renders a div

AvatarGroup

Container for grouping multiple avatars. Renders a div

AvatarGroupCount

Element for displaying a count in avatar groups. Renders a div

AvatarBadge

Badge element displayed on the avatar. Renders a span


For a complete list of props, see the Ark UI documentation.