Avatar

The avatar component is typically used to display circular (or square) user profile pictures or capital letters.

Icon

When filled, display an avatar icon.

TypeDefault Value
stringnull
<NVAvatar Icon="user"/>

Large

When filled, define the size of the avatar as lg.

TypeDefault Value
boolfalse
<NVAvatar Large Icon="user"/>

Medium

When filled (or when no Size or bool Size provided), define the size of the avatar as md.

TypeDefault Value
boolfalse
<NVAvatar Medium Icon="user"/>

Rounded

When true, the shape of the avatar will be a rounded square.

TypeDefault Value
boolfalse
TH
<NVAvatar Rounded Text="TH"/>

Size

Define the size of the avatar. You can use t-shirt sizes: xs, sm, md, lg, and xl in pixel or eventually a value in px.
If a px value is used, the avatar's size take the value and the icon size will have the half of the value. (avatar: 120px / icon: 60px)

TypeDefault Value
stringnull
AH
BB
CP
SG
TH
<NVStack Gutter="4" MB="4">
  <NVAvatar Size="xs" Icon="user"/>
  <NVAvatar Size="sm" Icon="user"/>
  <NVAvatar Size="md" Icon="user"/>
  <NVAvatar Size="lg" Icon="user"/>
  <NVAvatar Size="xl" Icon="user"/>
  <NVAvatar Size="80px" Icon="user"/>
</NVStack>
<NVStack Gutter="4" MB="4">
  <NVAvatar Size="xs" Text="AH"/>
  <NVAvatar Size="sm" Text="BB"/>
  <NVAvatar Size="md" Text="CP"/>
  <NVAvatar Size="lg" Text="SG"/>
  <NVAvatar Size="xl" Text="TH"/>  
</NVStack>
<NVStack Gutter="4">
  <NVAvatar Size="xs" Url="/img/avatar/women.jpg"/>
  <NVAvatar Size="sm" Url="/img/avatar/women.jpg"/>
  <NVAvatar Size="md" Url="/img/avatar/women.jpg"/>
  <NVAvatar Size="lg" Url="/img/avatar/women.jpg"/>
  <NVAvatar Size="xl" Url="/img/avatar/women.jpg"/>  
</NVStack>

Small

When filled, define the size of the avatar as sm.

TypeDefault Value
boolfalse
<NVAvatar Small Icon="user"/>

Square

When true, the shape of the avatar will be a square.

TypeDefault Value
boolfalse
TH
<NVAvatar Square Text="TH"/>

Text

Text of the avatar. Usually use two letters (max. 3 letters)
When filled with the Url Parameter, this text is used as the alt attribute content of the img tag.

TypeDefault Value
stringnull
TH
JH
<NVAvatar Text="TH" />
<NVAvatar Text="JH" Url="/img/avatar/women.jpg" />

Url

When filled, display avatar as an img tag.

TypeDefault Value
stringnull
-
<NVAvatar Url="/img/avatar/women.jpg" />

XLarge

When filled, define the size of the avatar as xl.

TypeDefault Value
boolfalse
<NVAvatar XLarge Icon="user"/>

XSmall

When filled, define the size of the avatar as xs.

TypeDefault Value
boolfalse
<NVAvatar XSmall Icon="user"/>