Avatar

Avatars can be used to represent people or objects. It supports images, Icons, or letters.

When To Use

  • Used to represent users or things, supporting the display of images, icons, or characters.

Basic

Three sizes and two shapes are available.

U
U
U
U
U

Type

Image, Icon and letter are supported, and the latter two kinds avatar can have custom colors and background colors.

Linus Torvalds
US
U

With Badge

Usually used for messages remind.

OU
OU
BU
AU

Avatar Group

Avatar group display.

One
Two
Three
+2

API

Avatar

Property
Description
Type
Default

src

The image source URL for the avatar. string -

alt

Alternative text for the image, also used to generate initials and colors if src is missing. string ""

fallback

Explicit text to use for initials and background color generation if src is missing. string -

size

The size of the avatar. "sm" | "md" | "lg" | "xl" "md"

shape

The shape of the avatar. "circle" | "square" | "rounded" "circle"

status

Adds a preset status badge indicating user availability. "online" | "offline" | "busy" | "away" -

class

Additional CSS classes for custom styling. string -

AvatarGroup

Property
Description
Type
Default

class

Additional CSS classes to apply to the avatar group container. string -