RUI.next

Data-Display
Avatar

Avatar

Avatar represents a user profile.

In addition, the following props of Image component are also supported: alt lazy onClick onError.

<Avatar src={SOME_IMAGE_SRC} />
<Avatar src={SOME_IMAGE_SRC} />

Example

Basic usage of Avatar component.

Avatar shape
Customize avatar size
Avatar with fallback image

API

PropertiesDescriptionTypeDefault
fallbackThe fallback placeholderReactNodeThe fallback image.
fitThe fill mode of the image'contain' | 'cover' | 'fill' | 'none' | 'scale-down'cover
srcThe image source of avatarstring-
shapeThe image shapesquare | circlesquare
sizeThe image sizenumber-