Avatar

A nice avatar and with many interesting features

Default

Often you need to add an user's avatar to your app. In order to make this we have the component vs-avatar.

To add an internal text value such as Luis use the text property.

TIP

If the text has more than 5 letters, only the first letter will be shown as in the second avatar, the name is Luis Daniel and only the letters LD will be shown if the word contains spaces the initial of each one is added.

person
L
Luisd
LD

Size

You can change the size of the Avatar with the property size the allowed values ​​are:

  • large
  • small
  • Custom measure

TIP

In the example the last avatar has the custom size of 70px the added value will be the avatar's height and width

person
LD

Color

You can change the Avatar's color by using the property color. If needed you could also change the text's color with the property text-color.

P
S
D
W
dark
RGB
HEX
HR

With Badge

You can add a notification label to the avatar, either a reference point or a number with the property badge.

You could also change the badge's color by using the property badge-color. You are able to use the Main Colorsopen in new window or RGB and HEX colors.

WARNING

Only RGB and HEX colors are supported.

person
2
L
10
Luisd

Icon

You can change the main icon of the Avatar with the property icon

TIP

Vuesax uses the Google Material Icons font library by default. For a list of all available icons, visit the official Material Icons pageopen in new window. Other icon libraries can be used by providing the class for the respective pack in the icon-pack property. ex. FA4 uses fa or fas, FA5 uses fas, far, or fal.

This icon is only displayed when there is no property as text o src

person
date_range
whatshot
photo_camera
filter_vintage
watch

API #

NameTypeParametersDescriptiondefault
textStringIf the text is very long, only the first letter is added.
text-colorStringText colores principales, RGB, HEXDefine the color of the Text.rgb(255, 255, 255)
srcStringUrl of the image to show in the Avatar.
sizeStringlarge, small, Custom measure (70px)Size of the image to show in the Avatar.32px
colorStringColores Principales, RGB, HEXDefine the color of the Avatar (does not affect the image).rgb(195, 195, 195)
badgeBoolean, NumberDefine if the badge is active and what is its value in number.
badge-colorStringColores Principales, RGB, HEXDefine the color of the Badge.danger
iconStringMaterial IconsDefine the icon within the Avatar.person
icon-packStringIcon Pack Class NameIcon Pack to be used. If not set, icon will default to Material Icons. ex. FA4 uses fa or fas, FA5 uses fas, far, or fal.material-icons