On this page
API Reference

Avatar#

Github

Avatar is typically used to display a user's profile picture or an icon representing the user. It can contain an image, icon, or the user's initials, and is commonly used wherever user identity needs to be displayed.

import { Avatar } from "wis/avatar"

API Reference#

NameTypeDefaultDescription
iconReactNodenoneDisplays the avatar icon. This property is ignored if an avatar image URL is provided.
srcstringnoneDisplays the avatar image.
sizelg md sm xsmdThe size of the avatar.
colorauto gray blue purple orange red greenautoControls the display color of the avatar. auto color is not completely random, but randomly generated from a list of colors.
colorSchemadark light outlinelightControls the display color schema of the avatar.
shapecircle squarecircleThe shape of the avatar to apply.
namestringnoneThe name will only be displayed if there is no image or icon.
initialsstringnoneWhen the initials automatically generated from the name do not meet the requirements, you can pass in custom display text through this property.