logoRuru UI

Avatar

The Avatar component is used to represent a user or entity.

RU

Installation

npx ruru-ui-cli@latest add avatar

Usage

The Avatar component is used to represent a user or entity.

RURURU

Props

PropDescriptionTypeDefault
srcThe URL of the image to be displayed.string-
placeholderThe placeholder text to be displayed when the image is not available.string-
sizeThe size of the avatar.number30
classNameThe class name to be applied to the avatar.string-

AvatarGroup

The AvatarGroup component is used to display multiple avatars in a group.

ruru-m07leerobevilrabbitrauchgshadcn
ruru-m07leerobevilrabbit
+2
ruru-m07leerobevilrabbit
+2

Props

PropDescriptionTypeDefault
membersAn array of objects containing the src and alt properties of the avatar.Array<{ src: string; alt: string }>-
limitThe maximum number of avatars to be displayed.number-
sizeThe size of the avatars.number30
classNameThe class name to be applied to the avatar group.string-

AvatarWithBadge

The AvatarWithBadge component is used to display an avatar with a badge.

badge
badge
badge

Props

PropDescriptionTypeDefault
srcThe URL of the image to be displayed.string-
badgeSrcThe URL of the badge image to be displayed.string-
sizeThe size of the avatar.number30
classNameThe class name to be applied to the avatar.string-
placeholderThe placeholder text to be displayed when the image is not available.string-

On this page