Button

Button communicates the action that will occur when the user touches them. The buttons component replaces the standard html button with a material design theme and a multitude of options. Any color helper class can be used to alter the background or text color.

Color

Color define the button color.
TypeDefault Value
stringnull
<NVStack Gutter="4" MB="4" Overflow="auto">
  <NVButton Color="neutral">Neutral </NVButton>
  <NVButton Color="primary">Primary </NVButton>
  <NVButton Color="secondary">Secondary </NVButton>
  <NVButton Color="error">Error </NVButton>
</NVStack>
<NVStack Gutter="4" MB="4" Overflow="auto">
  <NVButton Level="2" Color="neutral">Neutral </NVButton>
  <NVButton Level="2" Color="primary">Primary </NVButton>
  <NVButton Level="2" Color="secondary">Secondary </NVButton>
  <NVButton Level="2" Color="error">Error </NVButton>
</NVStack>
<NVStack Gutter="4" Overflow="auto">
  <NVButton Level="3" Color="neutral">Neutral </NVButton>
  <NVButton Level="3" Color="primary">Primary </NVButton>
  <NVButton Level="3" Color="secondary">Secondary </NVButton>
  <NVButton Level="3" Color="error">Error </NVButton>
</NVStack>

Cta

Cta defines if the button is a "Call To Action".
This kind of button got a pill shape and 3 sizes: Medium, Large and XLarge.

TypeDefault Value
stringnull
<NVStack Gutter="4" Overflow="auto">
  <NVButton Cta>Level 1 </NVButton>
  <NVButton Cta Level="2">Level 2 </NVButton>
  <NVButton Cta Level="3">Level 3 </NVButton>
</NVStack>

Full

Full set the button width to 100%. It's act as WFull.

TypeDefault Value
boolfalse
<NVButton Full>Full </NVButton>

Icon

Transform the button to a Button Icon.

TypeDefault Value
stringnull
<NVButton Icon="search" />

Large

Set the size of the button to lg.

TypeDefault Value
boolfalse
<NVButton Cta Large>Large </NVButton>

LeadIcon

Add the icon selected by LeadIcon value after the text of the button.

TypeDefault Value
stringnull
<NVButton LeadIcon="search">LeadIcon </NVButton>

Level

Level define the ui style of the button.

TypeDefault Value
string1
<NVStack Gutter="4" MB="4">
  <NVButton>Default </NVButton>
  <NVButton Level="1">Level 1 </NVButton>
  <NVButton Level="2">Level 2 </NVButton>
  <NVButton Level="3">Level 3 </NVButton>
</NVStack>
<NVStack Gutter="4">
  <NVButton>Default CTA </NVButton>
  <NVButton Cta Level="1">CTA Level 1 </NVButton>
  <NVButton Cta Level="2">CTA Level 2 </NVButton>
  <NVButton Cta Level="3">CTA Level 3 </NVButton>
</NVStack>

Loading

Loading say to user that an async action is performed.
An loading animation will replace the text of the button when true.

TypeDefault Value
boolfalse
<NVButton Loading>Loading </NVButton>

Size

Define the size of the button.
Classic button can have a size of "xs", "sm" or "md" when Cta buttons can have a size of "md", "lg" or "xl".

TypeDefault Value
stringnull
<NVStack Gutter="4" MB="4">
  <NVButton Size="@Size.XSMALL">XSmall</NVButton>
  <NVButton Size="@Size.SMALL">Small</NVButton>
  <NVButton Size="@Size.Medium">Medium</NVButton>
</NVStack>
<NVStack Gutter="4">
  <NVButton Cta Size="@Size.Medium">CTA Medium</NVButton>
  <NVButton Cta Size="@Size.LARGE">CTA Large</NVButton>
  <NVButton Cta Size="@Size.XLARGE">CTA XLarge</NVButton>
</NVStack>

Small

Set the size of the button to sm.

TypeDefault Value
boolfalse
<NVButton Small>Small</NVButton>

TaiIcon

Add the icon selected by TaiIcon value after the text of the button.

TypeDefault Value
stringnull
<NVButton TaiIcon="search">TaiIcon</NVButton>

Type

Type define the button kind.

TypeDefault Value
stringfalse
<NVStack Gutter="4">
  <NVButton>Default</NVButton>
  <NVButton Type="button">default or button</NVButton>
  <NVButton Type="reset">reset</NVButton>
  <NVButton Type="submit">submit</NVButton>
</NVStack>

XLarge

Set the size of the button to xl.
TypeDefault Value
boolfalse
<NVButton Cta XLarge>XLarge</NVButton>

XSmall

Set the size of the button to xs.
TypeDefault Value
boolfalse
<NVButton XSmall>XSmall</NVButton>