Components
Avatar

Avatar

Import

import { VKAvatar } from "@vivakits/react-components";

Variant

The Avatar component comes with 2 different variants that you can change using the variant prop. If no variant is provided, a default icon is shown.

VK

Shape

The Avatar component comes with 3 different shapes that you can change using the shape prop.

Size

The Avatar component comes with 6 different sizes that you can change using the size prop.

Color

The Avatar component comes with 8 different colors that you can change using the color prop.

Font Size

The Avatar component comes with 7 different font sizes that you can change using the fontSize prop.

SY
SY
SY
SY
SY
SY

Border Color

The Avatar component comes with 7 different border color that you can change using the borderColor prop.

API Reference

AttributeTypeDescriptionDefault
variantimagetextChanges avatar typetext
shaperoundedcurvedsquareChanges avatar shaperounded
colornoneprimarysecondarysuccessdangerwarningdarklightChanges avatar colorprimary
borderColorprimarysecondarysuccessdangerwarningdarklightChanges avatar border colordark
sizexssmmdlgxl2xlChanges avatar sizelg
fontSizedefaultxssmmdlgxl2xlChanges font size on avatar textdefault
fontFamilydefaultsansSerifserifmonoChanges font family on avatar textdefault
fontColordefaultprimarysecondarysuccessdangerwarningdarklightChanges font color on avatar textdefault
withBorderbooleanDetermines if avatar should have borderfalse
textValuestringApplies shortened version of text using textValue. Ex: "John Doe" will be shown as "JD". only first 2 words are used -