The NVBaseComponent class is the Base class inherited by almost every components of Elia Design.
AddClass
Add a class to the component.
Parameter Name | Type |
---|
className | string |
AddClass(DomClass.TextColor("orange-500"))
AddStyle
Add a style to the component.
Parameter Name | Type |
---|
style | string |
AddStyle(DomStyle.TextColor("#F00"))
Attributes
Generate attributes Dictionary based on passed Parameters.
Parameter Name | Type |
---|
component | string |
avoidClasses | string[] |
avoidStyles | string[] |
avoidAttributes | string[] |
Return type
Dictionary<string, object>
@inherits Nova.Components.NVBaseComponent;
<div @attributes=@Attributes(_componentClass, new string [] {"Color"})>
...
</div>
@code {
private string _componentClass = "my-new-component";
[Parameter]
public bool Small { get; set; }
[Parameter]
public bool Loading { get; set; }
public override async Task SetParametersAsync(ParameterView parameters) {
await base.SetParametersAsync(parameters);
AddClass(DomClass.Loading(Loading, _componentClass));
AddClass(DomClass.Small(Small, _componentClass));
string[] colorTint = ColorUtils.GetColorTint(Color?.ToLower() ?? "orange-500");
if (String.IsNullOrEmpty(TextColor)) {
AddClass(DomClass.TextColor(colorTint[0], 600));
}
if (String.IsNullOrEmpty(BackgroundColor)) {
AddClass(DomClass.BackgroundColor(colorTint[0], 100));
}
}
}
<div class="my-new-component ...classFromParameters" style="...styleFromParameters" ...attrFromParameters ></div>
ActiveEffect
Add the effect class when the element has an :active pseudo class.
Type | Default Value |
---|
string | null |
<NVButton ActiveEffect="@ActiveEffect.UP"> </NVButton>
<button class="nv-btn effect-up"></button>
Alt
Add the attribute alt to img element.
Type | Default Value |
---|
string | null |
<NVBlock Tag="img" Alt="Alternate text"></NVBlock>
<img alt="Alternate text" />
BackgroundColor
Set the Background Color to the element.
Type | Default Value |
---|
string | null |
<NVBlock BackgroundColor="orange-500"></NVBlock>
<div class="bg-orange-500"></div>
<NVBlock BackgroundColor="#FF0000"></NVBlock>
<div style="background-color:#FF0000;"></div>
ActiveBackgroundColor
Set the Background Color to the element when active.
Type | Default Value |
---|
string | null |
<NVButton ActiveBackgroundColor="orange-500"> </NVButton>
<div class="nv-btn active:bg-orange-500"></div>
HoverBackgroundColor
Set the Background Color to the element when hovered.
Type | Default Value |
---|
string | null |
<NVBlock HoverBackgroundColor="orange-500"></NVBlock>
<div class="hover:bg-orange-500"></div>
BorderColor
Set the border color to the element.
Type | Default Value |
---|
string | null |
<NVBlock BorderColor="orange-500"></NVBlock>
<div class="border-orange-500"></div>
<NVButton BorderColor="#FF0000"> </NVButton>
<div style="border-color:#FF0000;"></div>
ActiveBorderColor
Set the border color to the element when active.
Type | Default Value |
---|
string | null |
<NVBlock ActiveBorderColor="orange-500"></NVBlock>
<div class="active:border-orange-500"></div>
HoverBorderColor
Set the border color to the element when hovered.
Type | Default Value |
---|
string | null |
<NVBlock HoverBorderColor="orange-500"></NVBlock>
<div class="hover:border-orange-500"></div>
BorderRadius
Set border radius of an element.
Type | Default Value |
---|
string | null |
<NVBlock BorderRadius="sm"></NVBlock>
<div class="rounded-sm"></div>
<NVBlock BorderRadius="t-sm"></NVBlock>
<div class="rounded-t-sm"></div>
<NVBlock BorderRadius="tl-sm br-sm"></NVBlock>
<div class="rounded-tl-sm rounded-br-sm"></div>
<NVBlock BorderRadius="base"></NVBlock>
<div class="rounded"></div>
<NVBlock BorderRadius="2px"></NVBlock>
<div style="border-top-left-radius: 2px; border-top-right-radius: 2px;border-bottom-right-radius: 2px; border-bottom-left-radius: 2px;"></div>
<NVBlock BorderRadius="2px 4px">
<div style="border-top-left-radius: 2px; border-top-right-radius: 4px;border-bottom-right-radius: 2px; border-bottom-left-radius: 4px;"></div>
<NVBlock BorderRadius="4px . . ."></NVBlock>
<div style="border-top-left-radius: 4px;"></div>
<NVBlock BorderRadius=". . . 4px"></NVBlock>
<div style="border-bottom-left-radius: 4px;"></div>
BorderWidth
Use the logic of Padding/Margin for the position of the borders.
The dot (.) will omit value on the corresponding position (top, left, right or bottom).
Type | Default Value |
---|
string | null |
<NVBlock BorderWidth="0 ."></NVBlock>
<div class="border-t-0 border-b-0"></div>
<NVBlock BorderWidth="0 1 2"></NVBlock>
<div class="border-t-0 border-r border-b-2 border-l"></div>
<NVBlock BorderWidth="1 2 4 8"></NVBlock>
<div class="border-t border-r-2 border-b-4 border-l-8"></div>
<NVBlock BorderWidth="1 2 . 8"></NVBlock>
<div class="border-t border-r-2 border-l-8"></div>
Bottom
Set the bottom position of the element.
Type | Default Value |
---|
string | null |
<NVBlock Bottom="0"></NVBlock>
<div style="bottom:0;"></div>
ChildContent
Default RenderFragment for children.
Type | Default Value |
---|
RenderFragment | null |
<NVBlock>
<NVBlock Class="child-content"></NVBlock>
</NVBlock>
<div>
<div class="child-content"></div>
</div>
ChildMargin
Set the padding of all children of the element.
The dot (.) will set no value on the position.
Positions logic are: top, right, bottom, left.
Type | Default Value |
---|
string | null |
<NVBlock ChildMargin="1 . ."></NVBlock>
<div class="cmt-1"></div>
<NVBlock ChildMargin="1"></NVBlock>
<NVBlock ChildMargin="1 2"></NVBlock>
<div class="cmy-1 cmx-2"></div>
<NVBlock ChildMargin="1 2 3"></NVBlock>
<div class="cmt-1 cmx-2 cmb-3"></div>
<NVBlock ChildMargin="1 2 3 4"></NVBlock>
<div class="cmt-1 cmr-2 cmb-3 cml-4"></div>
ChildPadding
Set the padding of all children of the element.
The dot (.) will set no value on the position.
Positions logic are: top, right, bottom, left.
Type | Default Value |
---|
string | null |
<NVBlock ChildPadding="1 . ."></NVBlock>
<div class="cpt-1"></div>
<NVBlock ChildPadding="1"></NVBlock>
<NVBlock ChildPadding="1 2"></NVBlock>
<div class="cpy-1 cpx-2"></div>
<NVBlock ChildPadding="1 2 3"></NVBlock>
<div class="cpt-1 cpx-2 cpb-3"></div>
<NVBlock ChildPadding="1 2 3 4"></NVBlock>
<div class="cpt-1 cpr-2 cpb-3 cpl-4"></div>
Class
Type | Default Value |
---|
string | null |
<NVBlock Class="sample"></NVBlock>
<div class="sample"></div>
CM
Shortcut for ChildMargin.
Type | Default Value |
---|
string | null |
CMB
Add child margin bottom class.
Type | Default Value |
---|
string | null |
<NVBlock CMB="1"></NVBlock>
<div class="cmb-1"></div>
CML
Add child margin left class.
Type | Default Value |
---|
string | null |
<NVBlock CML="1"></NVBlock>
<div class="cml-1"></div>
CMR
Add child margin right class.
Type | Default Value |
---|
string | null |
<NVBlock CMR="1"></NVBlock>
<div class="cmr-1"></div>
CMT
Add child margin top class.
Type | Default Value |
---|
string | null |
<NVBlock CMT="1"></NVBlock>
<div class="cmt-1"></div>
CMX
Add child margin left and right class.
Type | Default Value |
---|
string | null |
<NVBlock CMX="1"></NVBlock>
<div class="cmx-1"></div>
CMY
Add child margin top and bottom class.
Type | Default Value |
---|
string | null |
<NVBlock CMY="1"></NVBlock>
<div class="cmy-1"></div>
Color
Contextual color depending of the component.
By default act as a BackgroundColor parameter.
Type | Default Value |
---|
string | null |
<NVButton Color="orange-500"> </NVButton>
<button class="nv-btn nv-btn-md nv-btn-level-1 orange-500"></button>
<NVButton Color="#F00"> </NVButton>
<button class="nv-btn nv-btn-md nv-btn-level-1 neutral" style="background-color: #F00"></button>
ColSize
Add the class to specify that the component is a column and has a specific size.
Type | Default Value |
---|
string | null |
<NVBlock ColSize="2"></NVBlock>
<div class="nv-col w-2/12"></div>
Content
Utilities for controlling how rows are positioned in multi-row flex and grid containers.
Type | Default Value |
---|
string | null |
<NVBlock Content="@Content.START"></NVBlock>
<div class="content-start"></div>
<NVBlock Content="@Content.END"></NVBlock>
<div class="content-end"></div>
CP
Shortcut for ChildPadding.
Type | Default Value |
---|
string | null |
CPB
Add child padding bottom class.
Type | Default Value |
---|
string | null |
<NVBlock CPB="1">
<div>Child with padding bottom of 4px</div>
<div>Child with padding bottom of 4px</div>
</NVBlock>
<div class="cpb-1">
<div>Child with padding bottom of 4px</div>
<div>Child with padding bottom of 4px</div>
</div>
CPL
Add child padding left class.
Type | Default Value |
---|
string | null |
<NVBlock CPL="1">
<div>Child with padding left of 4px</div>
<div>Child with padding left of 4px</div>
</NVBlock>
<div class="cpl-1">
<div>Child with padding left of 4px</div>
<div>Child with padding left of 4px</div>
</div>
CPR
Add child padding right class.
Type | Default Value |
---|
string | null |
<NVBlock CPR="1">
<div>Child with padding right of 4px</div>
<div>Child with padding right of 4px</div>
</NVBlock>
<div class="cpr-1">
<div>Child with padding right of 4px</div>
<div>Child with padding right of 4px</div>
</div>
CPT
Add child padding top class.
Type | Default Value |
---|
string | null |
<NVBlock CPT="1">
<div>Child with padding top of 4px</div>
<div>Child with padding top of 4px</div>
</NVBlock>
<div class="cpt-1">
<div>Child with padding top of 4px</div>
<div>Child with padding top of 4px</div>
</div>
CPX
Add child padding left and right class.
Type | Default Value |
---|
string | null |
<NVBlock CPX="1">
<div>Child with padding left and right of 4px</div>
<div>Child with padding left and right of 4px</div>
</NVBlock>
<div class="cpx-1">
<div>Child with padding left and right of 4px</div>
<div>Child with padding left and right of 4px</div>
</div>
CPY
Add child padding top and bottom class.
Type | Default Value |
---|
string | null |
<NVBlock CPY="1">
<div>Child with padding top and bottom of 4px</div>
<div>Child with padding top and bottom of 4px</div>
</NVBlock>
<div class="cpy-1">
<div>Child with padding left of 4px</div>
<div>Child with padding left of 4px</div>
</div>
DicClass
Dictionary used to add a class when the bool value of a key is true.
Type | Default Value |
---|
Dictionary<string, bool> | null |
<NVBlock DicClass="@(new Dictionary<string, bool>() {
{"border", true},
{"border-gray-200", true},
{"app-sidebar-close", false},
)"></NVBlock
<div class="border border-gray-200"></div>
Direction
Utilities for controlling the direction of the flex container.
Type | Default Value |
---|
string | null |
<NVBlock Direction="@Direction.ROW"></NVBlock>
<div class="flex-row"></div>
<NVBlock Direction="@Direction.COLUMN_REVERSE"></NVBlock>
<div class="flex-col-reverse"></div>
Disabled
Add the attribute disabled.
Type | Default Value |
---|
bool | false |
<NVButton Disabled> </NVButton>
<button disabled></button>
<NVBlock Tag="input" Disabled></NVBlock>
<NVBlock Disabled></NVBlock>
Display
Set the display of the element.
Type | Default Value |
---|
string | null |
<NVBlock Display="@Display.HIDDEN"></NVBlock>
<div class="hidden"></div>
<NVBlock Display="@Display.BLOCK"></NVBlock>
<div class="block"></div>
<NVBlock Display="@Display.INLINE"></NVBlock>
<div class="inline"></div>
FontSize
Set a font-size to the element.
Type | Default Value |
---|
string | null |
<NVBlock FontSize="16px"></NVBlock>
<div style="font-size:16px;"></div>
FontWeight
Set the text alignment of the element.
Type | Default Value |
---|
string | null |
<NVBlock FontWeight="@FontWeight.NORMAL"></NVBlock>
<div class="font-normal"></div>
<NVBlock FontWeight="@FontWeight.MEDIUM"></NVBlock>
<div class="font-medium"></div>
<NVBlock FontWeight="FontWeight.BOLD"></NVBlock>
<div class="font-bold"></div>
GCM
Shortcut for GrandChildMargin.
Type | Default Value |
---|
string | null |
GCMB
Add grand child margin bottom class.
Type | Default Value |
---|
string | null |
<NVBlock GCMB="1"></NVBlock>
<div class="gcmb-1"></div>
GCML
Add grand child margin left class.
Type | Default Value |
---|
string | null |
<NVBlock GCML="1"></NVBlock>
<div class="gcml-1"></div>
GCMR
Add grand child margin right class.
Type | Default Value |
---|
string | null |
<NVBlock GCMR="1"></NVBlock>
<div class="gcmr-1"></div>
GCMT
Add grand child margin top class.
Type | Default Value |
---|
string | null |
<NVBlock GCMT="1"></NVBlock>
<div class="gcmt-1"></div>
GCMX
Add grand child margin left and right class.
Type | Default Value |
---|
string | null |
<NVBlock GCMX="1"></NVBlock>
<div class="gcmx-1"></div>
GCMY
Add grand child margin top and bottom class.
Type | Default Value |
---|
string | null |
<NVBlock GCMY="1"></NVBlock>
<div class="gcmy-1"></div>
GCP
Shortcut for GrandChildPadding.
Type | Default Value |
---|
string | null |
GCPB
Add grand child padding bottom class.
Type | Default Value |
---|
string | null |
<NVBlock GCPB="1">
<div>
<div>Grand Child with padding bottom of 4px</div>
<div>Grand Child with padding bottom of 4px</div>
</div>
</NVBlock>
<div class="gcpb-1">
<div>
<div>Grand Child with padding bottom of 4px</div>
<div>Grand Child with padding bottom of 4px</div>
</div>
</div>
GCPL
Add grand child padding left class.
Type | Default Value |
---|
string | null |
<NVBlock GCPL="1">
<div>
<div>Grand Child with padding left of 4px</div>
<div>Grand Child with padding left of 4px</div>
</div>
</NVBlock>
<div class="gcpl-1">
<div>
<div>Grand Child with padding left of 4px</div>
<div>Grand Child with padding left of 4px</div>
</div>
</div>
GCPR
Add grand child padding right class.
Type | Default Value |
---|
string | null |
<NVBlock GCPR="1">
<div>
<div>Grand Child with padding right of 4px</div>
<div>Grand Child with padding right of 4px</div>
</div>
</NVBlock>
<div class="gcpr-1">
<div>
<div>Grand Child with padding right of 4px</div>
<div>Grand Child with padding right of 4px</div>
</div>
</div>
GCPT
Add grand child padding top class.
Type | Default Value |
---|
string | null |
<NVBlock GCPT="1">
<div>
<div>Grand Child with padding top of 4px</div>
<div>Grand Child with padding top of 4px</div>
</div>
</NVBlock>
<div class="gcpt-1">
<div>
<div>Grand Child with padding top of 4px</div>
<div>Grand Child with padding top of 4px</div>
</div>
</div>
GCPX
Add grand child padding left and right class.
Type | Default Value |
---|
string | null |
<NVBlock GCPX="1">
<div>
<div>
Grand Child with padding left and right of 4px
</div>
<div>
Grand Child with padding left and right of 4px
</div>
</div>
</NVBlock>
<div class="gcpx-1">
<div>
<div>
Grand Child with padding left and right of 4px
</div>
<div>
Grand Child with padding left and right of 4px
</div>
</div>
</div>
GCPY
Add grand child padding top and bottom class.
Type | Default Value |
---|
string | null |
<NVBlock GCPY="1">
<div>
<div>
Grand Child with padding top and bottom of 4px
</div>
<div>
Grand Child with padding top and bottom of 4px
</div>
</div>
</NVBlock>
<div class="gcpy-1">
<div>
<div>
Grand Child with padding top and bottom of 4px
</div>
<div>
Grand Child with padding top and bottom of 4px
</div>
</div>
</div>
GrandChildMargin
Set the margin of all children of children of the element.
The dot (.) will set no value on the position.
Positions logic are: top, right, bottom, left.
Type | Default Value |
---|
string | null |
<NVBlock GrandChildMargin="1 . ."></NVBlock>
<div class="gcmt-1"></div>
<NVBlock GrandChildMargin="1"></NVBlock>
<div class="gcm-1"></div>
<NVBlock GrandChildMargin="1 2"></NVBlock>
<div class="gcmy-1 gcmx-2"></div>
<NVBlock GrandChildMargin="1 2 3"></NVBlock>
<div class="gcmt-1 gcmx-2 gcmb-3"></div>
<NVBlock GrandChildMargin="1 2 3 4"></NVBlock>
<div class="gcmt-1 gcmr-2 gcmb-3 gcml-4"></div>
GrandChildPadding
Set the padding of all children of children of the element.
The dot (.) will set no value on the position.
positions logic are: top, right, bottom, left.
Type | Default Value |
---|
string | null |
<NVBlock GrandChildPadding="1 . ."></NVBlock>
<div class="gcpt-1"></div>
<NVBlock GrandChildPadding="1"></NVBlock>
<div class="gcp-1"></div>
<NVBlock GrandChildPadding="1 2"></NVBlock>
<div class="gcpy-1 gcpx-2"></div>
<NVBlock GrandChildPadding="1 2 3"></NVBlock>
<div class="gcpt-1 gcpx-2 gcpb-3"></div>
<NVBlock GrandChildPadding="1 2 3 4"></NVBlock>
<div class="gcpt-1 gcpr-2 gcpb-3 gcpl-4"></div>
Grow
Set the growing of an element in a flex container.
Type | Default Value |
---|
string | null |
<NVBlock Grow="0"></NVBlock>
<div class="flex-grow-0"></div>
<NVBlock Grow="1"></NVBlock>
<div class="flex-grow"></div>
GutterX
Set margin on x axe between children elements.
Type | Default Value |
---|
string | null |
<NVBlock GutterX="2"></NVBlock>
<div class="gutter-x-2"></div>
GutterY
Set margin on y axe between children elements.
Type | Default Value |
---|
string | null |
<NVBlock GutterY="2"></NVBlock>
<div class="gutter-y-2"></div>
Height
Add height in the inline style of the element.
Type | Default Value |
---|
string | null |
<NVBlock Height="100px"></NVBlock>
<div style="height:100px;"></div>
<NVBlock Height="50%"></NVBlock>
<div style="height:50%;"></div>
<NVBlock Height="50vh"></NVBlock>
<div style="height:50vh;"></div>
HFull
Add the class to specify that the element get a height of 100%.
Type | Default Value |
---|
bool | false |
<NVBlock HFull></NVBlock>
<div class="h-full"></div>
Hover
Add the hover class to get default behavior of hovered background theme class.
Type | Default Value |
---|
bool | false |
<NVBlock Color="orange-500" Hover></NVBlock>
<div class="bg-orange-500 hover"></div>
Href
Add the attribute href to link element.
Type | Default Value |
---|
string | null |
<NVBlock Tag="a" Href="https://google.com"></NVBlock>
<a href="http://a-url.com"></a>
<NVBlock Href="https://google.com"></NVBlock>
Id
Type | Default Value |
---|
string | null |
<NVBlock Id="sample"></NVBlock>
IsActive
Add the class to specify that the element has 'is-active' class.
Type | Default Value |
---|
bool | false |
<NVBlock IsActive></NVBlock>
<div class="is-active"></div>
IsSelected
Add the class to specify that the element has 'is-selected' class.
Type | Default Value |
---|
bool | false |
<NVBlock IsSelected></NVBlock>
<div class="is-selected"></div>
Items
Utilities for controlling how flex and grid items are positioned along a container's cross axis.
Type | Default Value |
---|
string | null |
<NVBlock Items="@Items.START"></NVBlock>
<div class="items-start"></div>
<NVBlock Items="@Items.END"></NVBlock>
<div class="items-end"></div>
Justify
Utilities for controlling how flex and grid items are positioned along a container's main axis.
Type | Default Value |
---|
string | null |
<NVBlock Justify="@Justify.START"></NVBlock>
<div class="justify-start"></div>
<NVBlock Justify="@Justify.END"></NVBlock>
<div class="justify-end"></div>
JustifySelf
Utilities for controlling how an individual grid item is aligned along its inline axis.
Type | Default Value |
---|
string | null |
<NVBlock JustifySelf="@JustifySelf.START"></NVBlock>
<div class="justify-self-start"></div>
<NVBlock JustifySelf="@JustifySelf.END"></NVBlock>
<div class="justify-self-end"></div>
Left
Set the left position of the element.
Type | Default Value |
---|
string | null |
<NVBlock Left="0"></NVBlock>
<div style="left:0;"></div>
LG
LG parameters apply specified parameters when the screen has the large breakpoint width.
(lg breakpoint: between 1024px and above),
Type | Default Value |
---|
object | null |
LinearGradient
Add linear-gradient in the inline style of the element.
Type | Default Value |
---|
string | null |
<NVBlock LinearGradient="to bottom, red 20%, blue 70%">
<div style="linear-gradient:to bottom, red 20%, blue 70%;"></div>
M
Type | Default Value |
---|
string | null |
Margin
Set the margin of the element.
The dot (.) will set no value on the position.
Positions logic are: top, right, bottom, left.
Type | Default Value |
---|
string | null |
<NVBlock Margin="1 . ."></NVBlock>
<NVBlock Margin="1"></NVBlock>
<NVBlock Margin="1 2"></NVBlock>
<div class="my-1 mx-2"></div>
<NVBlock Margin="1 2 3"></NVBlock>
<div class="mt-1 mx-2 mb-3"></div>
<NVBlock Margin="1 2 3 4"></NVBlock>
<div class="mt-1 mr-2 mb-3 ml-4"></div>
<NVBlock Margin="1px . ."></NVBlock>
<div style="margin-top:1px;"></div>
<div style="margin-top:1px;margin-right:1px;margin-bottom:1px;margin-left:1px;"></div>
<NVBlock Margin="1px 2px"></NVBlock>
<div style="margin-top:1px;margin-right:2px;margin-bottom:1px;margin-left:2px;"></div>
<NVBlock Margin="1px 2px 3px"></NVBlock>
<div style="margin-top:1px;margin-right:2px;margin-bottom:3px;margin-left:2px;"></div>
<NVBlock Margin="1px 2px 3px 4px"></NVBlock>
<div style="margin-top:1px;margin-right:2px;margin-bottom:3px;margin-left:4px;"></div>
MaxHeight
Add max-height in the inline style of the element.
Type | Default Value |
---|
string | null |
<NVBlock MaxHeight="100px"></NVBlock>
<div style="max-height:100px;"></div>
<NVBlock MaxHeight="50%"></NVBlock>
<div style="max-height:50%;"></div>
<NVBlock MaxHeight="50vh"></NVBlock>
<div style="max-height:50vh;"></div>
MaxWidth
Add max-width in the inline style of the element.
Type | Default Value |
---|
string | null |
<NVBlock MaxWidth="100px"></NVBlock>
<div style="max-width:100px;"></div>
<NVBlock MaxWidth="50%"></NVBlock>
<div style="max-width:50%;"></div>
<NVBlock MaxWidth="50vw"></NVBlock>
<div style="max-width:50vw;"></div>
MB
Type | Default Value |
---|
string | null |
<NVBlock MB="1"></NVBlock>
MD
MD parameters apply specified parameters when the screen has the medium breakpoint width.
(md breakpoint: between 768px and above),
Type | Default Value |
---|
object | null |
MinHeight
Add min-height in the inline style of the element.
Type | Default Value |
---|
string | null |
<NVBlock MinHeight="100px"></NVBlock>
<div style="min-height:100px;"></div>
<NVBlock MinHeight="50%"></NVBlock>
<div style="min-height:50%;"></div>
<NVBlock MinHeight="50vh"></NVBlock>
<div style="min-height:50vh;"></div>
MinWidth
Add min-width in the inline style of the element.
Type | Default Value |
---|
string | null |
<NVBlock MinWidth="100px"></NVBlock>
<div style="min-width:100px;"></div>
<NVBlock MinWidth="50%"></NVBlock>
<div style="min-width:50%;"></div>
<NVBlock MinWidth="50vw"></NVBlock>
<div style="min-width:50vw;"></div>
ML
Type | Default Value |
---|
string | null |
<NVBlock ML="1"></NVBlock>
MR
Type | Default Value |
---|
string | null |
<NVBlock MR="1"></NVBlock>
MT
Type | Default Value |
---|
string | null |
<NVBlock MT="1"></NVBlock>
MX
Add margin left and right class.
Type | Default Value |
---|
string | null |
<NVBlock MX="1"></NVBlock>
MY
Add margin top and bottom class.
Type | Default Value |
---|
string | null |
<NVBlock MY="1"></NVBlock>
OnBlur
Add a focus event callback when the element is blurred.
Type | Default Value |
---|
EventCallback<FocusEventArgs> | null |
<NVBlock Tag="input" OnBlur="OnBlur"></NVBlock>
OnChange
Add a change event callback when the input value is changed.
Type | Default Value |
---|
EventCallback<ChangeEventArgs> | null |
<NVBlock Tag="input" OnChange="@OnChange"></NVBlock>
OnClick
Add a mouse event callback when element is clicked.
Type | Default Value |
---|
EventCallback<MouseEventArgs> | null |
<NVBlock OnClick="@OnClick"></NVBlock>
OnFocus
Add a focus event callback when the element is focused.
Type | Default Value |
---|
EventCallback<FocusEventArgs> | null |
<NVBlock Tag="input" OnFocus="@OnFocus"></NVBlock>
OnKeyDown
Add a keyboard event callback when the a keyboard key is down.
Type | Default Value |
---|
EventCallback<KeyboardEventArgs> | null |
<NVBlock Tag="input" OnKeyDown="@OnKeyDown"></NVBlock>
OnKeyPress
Add a keyboard event callback when the a keyboard key is press.
Type | Default Value |
---|
EventCallback<KeyboardEventArgs> | null |
<NVBlock Tag="input" OnKeyPress="@OnKeyPress"></NVBlock>
OnKeyUp
Add a keyboard event callback when the a keyboard key is released.
Type | Default Value |
---|
EventCallback<KeyboardEventArgs> | null |
<NVBlock Tag="input" OnKeyUp="@OnKeyUp">
OnMouseDown
Add a mouse event callback when the mouse is clicked down on the element.
Type | Default Value |
---|
EventCallback<MouseEventArgs> | null |
<NVBlock OnMouseDown="@OnMouseDown"></NVBlock>
OnMouseEnter
Add a mouse event callback when the mouse enter over the element.
Type | Default Value |
---|
EventCallback<MouseEventArgs> | null |
<NVBlock OnMouseEnter="@OnMouseEnter"></NVBlock>
OnMouseLeave
Add a mouse event callback when the mouse leave from the element.
Type | Default Value |
---|
EventCallback<MouseEventArgs> | null |
<NVBlock OnMouseLeave="@OnMouseLeave"></NVBlock>
OnMouseMove
Add a mouse event callback when the mouse move within element.
Type | Default Value |
---|
EventCallback<MouseEventArgs> | null |
<NVBlock OnMouseMove="@OnMouseMove"></NVBlock>
OnMouseOut
Add a mouse event callback when the mouse is out the element.
Type | Default Value |
---|
EventCallback<MouseEventArgs> | null |
<NVBlock OnMouseOut="@OnMouseOut"></NVBlock>
OnMouseOver
Add a mouse event callback when the mouse is over the element.
Type | Default Value |
---|
EventCallback<MouseEventArgs> | null |
<NVBlock OnMouseOver="@OnMouseOver"></NVBlock>
OnMouseUp
Add a mouse event callback when the mouse is clicked up on the element.
Type | Default Value |
---|
EventCallback<MouseEventArgs> | null |
<NVBlock OnMouseUp="@OnMouseUp"></NVBlock>
Opacity
Set the opacity of the element.
Type | Default Value |
---|
string | null |
<NVBlock Opacity="0"></NVBlock>
<div class="opacity-0"></div>
Overflow
Set a font-size and a line-height to the element.
Type | Default Value |
---|
string | null |
<NVBlock Overflow="@Overflow.AUTO"></NVBlock>
<div class="overflow-auto"></div>
<NVBlock Overflow="@($"Overflow.HIDDEN Overflow.AUTO")">
<div class="overflow-x-hiden overflow-y-auto">
P
Type | Default Value |
---|
string | null |
Pad
Define a specific padding on children of the elements.
If the value is set to 1, the y padding value is set to 1 and the x padding is set to 2.
Type | Default Value |
---|
string | null |
<NVBlock Pad="1"></NVBlock>
<div class="cpy-1 cpx-2"></div>
Pad
Define a specific padding on children of the elements.
If the value is set to 1, the y padding value is set to 1 and the x padding is set to 2.
Type | Default Value |
---|
string | null |
<NVBlock Pad="1"></NVBlock>
<div class="cpy-1 cpx-2"></div>
Padding
Set the padding of the element.
The dot (.) will set no value on the position.
Positions logic are: top, right, bottom, left.
Type | Default Value |
---|
string | null |
<NVBlock Padding="1 . ."></NVBlock>
<NVBlock Padding="1"></NVBlock>
<NVBlock Padding="1 2"></NVBlock>
<div class="py-1 px-2"></div>
<NVBlock Padding="1 2 3"></NVBlock>
<div class="pt-1 px-2 pb-3"></div>
<NVBlock Padding="1 2 3 4"></NVBlock>
<div class="pt-1 pr-2 pb-3 pl-4"></div>
<NVBlock Padding="1px . ."></NVBlock>
<div style="padding-top:1px;"></div>
<div style="padding-top:1px;padding-right:1px;padding-bottom:1px;padding-left:1px;"></div>
<NVBlock Padding="1em 2px">
<div style="padding-top:1em;padding-right:2px;padding-bottom:1em;padding-left:2px;"></div>
<NVBlock Padding="1% 2em 3px">
<div style="padding-top:1%;padding-right:2em;padding-bottom:3px;padding-left:2em;"></div>
<NVBlock Padding="1px 2px 3px 4px">
<div style="padding-top:1px;padding-right:2px;padding-bottom:3px;padding-left:4px;"></div>
PB
Add padding bottom class.
Type | Default Value |
---|
string | null |
<NVBlock PB="1"></NVBlock>
PL
Type | Default Value |
---|
string | null |
<NVBlock PL="1"></NVBlock>
Position
Set the display of the element.
Type | Default Value |
---|
string | null |
<NVBlock Position="@Position.RELATIVE"></NVBlock>
<div class="relative"></div>
<NVBlock Position="@Position.ABSOLUTE"></NVBlock>
<div class="absolute"></div>
PR
Type | Default Value |
---|
string | null |
<NVBlock PR="1"></NVBlock>
PreventDefault
Remove the preventDefault action of the event.
You can preventDefault multiple events by entering a string composed of event names separated by a white space.
Type | Default Value |
---|
string | null |
<NVButton PreventDefault="onclick" OnClick="@OnClick">button </NVButton>
<NVFieldText PreventDefault="onkeydown onkeyup" OnKeyDown="@OnKeyDown" OnKeyUp="@OnKeyUp" />
PT
Type | Default Value |
---|
string | null |
<NVBlock PT="1"></NVBlock>
PX
Add padding left and right class.
Type | Default Value |
---|
string | null |
<NVBlock PX="1"></NVBlock>
PY
Add padding top and bottom class.
Type | Default Value |
---|
string | null |
<NVBlock PY="1"></NVBlock>
Right
Set the right position of the element.
Type | Default Value |
---|
string | null |
<NVBlock Right="0"></NVBlock>
<div style="right:0;"></div>
Row
Add the class to specify that the component is a row.
Type | Default Value |
---|
bool | false |
<div class="nv-row"></div>
Self
Utilities for controlling how an individual flex or grid item is positioned along its container's cross axis.
Type | Default Value |
---|
string | null |
<NVBlock Self="@Self.AUTO"></NVBlock>
<div class="self-auto"></div>
<NVBlock Self="@Self.START"></NVBlock>
<div class="self-start"></div>
SetRef
Action that set the ElementReference of the component.
Sometimes it's useful to get the reference of the html element to manipulate it by javascript.
Type | Default Value |
---|
Action<ElementReference> | null |
<NVBlock SetRef="@OnSetRef"></NVBlock>
...
void OnSetRef(ElementReference r)
{
}
<ParentComponent ChildRef="ForwardRef">
<NVBlock SetRef="@OnSetRef"></NVBlock>
</ParentComponent>
...
public ForwardRef ForwardRef { get; set; } = new ForwardRef();
void OnSetRef(ElementReference r)
{
ForwardRef.Current = r;
}
Shrink
Set the Shrinking of an element in a flex container.
Type | Default Value |
---|
string | null |
<NVBlock Shrink="0"></NVBlock>
<div class="flex-shrink-0"></div>
<NVBlock Shrink="1"></NVBlock>
<div class="flex-shrink"></div>
SM
SM parameters apply specified parameters when the screen has the small breakpoint width.
(sm breakpoint: between 640px and above)
Type | Default Value |
---|
object | null |
Src
Add the attribute src to img element.
Type | Default Value |
---|
string | null |
<NVBlock Tag="img" Src="http://hanami.be/img/logo.gif"></NVBlock>
<img src="http://hanami.be/img/logo.gif" />
Stack
Add the class to specify that the component is a stack.
Type | Default Value |
---|
bool | false |
<div class="nv-stack"></div>
StackFlex
Add the class to specify that all children of the component are flexible.
Type | Default Value |
---|
bool | false |
<div class="nv-stack stack-flex"></div>
StackItemFlex
Add the class to specify that the element within a stack is flexible.
Type | Default Value |
---|
bool | false |
<NVBlock StackItemFlex />
<div class="nv-stack-item-flex"></div>
StackItemLead
Add the class to specify that the element within a stack is the lead.
Type | Default Value |
---|
bool | false |
<NVBlock StackItemLead />
<div class="nv-stack-item-lead"></div>
StackItemTail
Add the class to specify that the element within a stack is the tail.
Type | Default Value |
---|
bool | false |
<NVBlock StackItemTail />
<div class="nv-stack-item-tail"></div>
StackVertical
Add the class to specify that the component is a vertical stack.
Type | Default Value |
---|
bool | false |
<NVBlock StackVertical />
<div class="nv-stack nv-stack-vertical"></div>
StopPropagation
Remove the propagation of an event.
You can remove propagation of multiple events by entering a string composed of event names separated by a white space.
Type | Default Value |
---|
string | null |
<NVButton StopPropagation="onclick" OnClick="@OnClick">button </NVButton>
<NVFieldText StopPropagation="onmouseleave onmouseenter" OnMouseEnter="@OnMouseEnter" OnMouseLeave="@OnMouseLeave" />
Style
Type | Default Value |
---|
string | null |
<NVBlock Style="font-weight:bold;"></NVBlock>
<div style="font-weight:bold;"></div>
Tag
Apply the tag value on the component.
Type | Default Value |
---|
string | null |
<NVBlock Tag="a"></NVBlock>
<NVBlock Tag="strong"></NVBlock>
Target
Add the attribute target to link element.
Type | Default Value |
---|
string | null |
<NVBlock Tag="a" Target="_target"></NVBlock>
<NVBlock Target="_target"></NVBlock>
TextAlign
Set the text alignment of the element.
Type | Default Value |
---|
string | null |
<NVBlock TextAlign="@TextAlign.CENTER"></NVBlock>
<div class="center"></div>
<NVBlock TextAlign="@TextAlign.LEFT"></NVBlock>
TextColor
Set the text color to the element.
Type | Default Value |
---|
string | null |
<NVBlock TextColor="orange-500"></NVBlock>
<div class="text-orange-500"></div>
<NVBlock TextColor="#FF0000"></NVBlock>
<div style="color:#FF0000;"></div>
ActiveTextColor
Set the text color to the element when active.
Type | Default Value |
---|
string | null |
<NVButton ActiveTextColor="orange-500"> </NVButton>
<button class="nv-btn active:text-orange-500"></button>
HoverTextColor
Set the text color to the element when hovered.
Type | Default Value |
---|
string | null |
<NVBlock Hover="orange-500"></NVBlock>
<div class="hover:text-orange-500"></div>
TextSize
Set a font-size and a line-height to the element.
Type | Default Value |
---|
string | null |
<NVBlock TextSize="@TextSize.SM"></NVBlock>
<div class="text-sm"></div>
Title
Add the attribute title to link element.
Type | Default Value |
---|
string | null |
<NVBlock Tag="a" Title="title"></NVBlock>
<NVBlock Title="title"></NVBlock>
Top
Set the top position of the element.
Type | Default Value |
---|
string | null |
<NVBlock Top="0"></NVBlock>
<div style="top:0;"></div>
VerticalAlign
Set the vertical alignment of the element.
Type | Default Value |
---|
string | null |
<NVBlock VerticalAlign="@VerticalAlign.BASELINE"></NVBlock>
<div class="align-baseline"></div>
<NVBlock VerticalAlign="@VerticalAlign.MIDDLE"></NVBlock>
<div class="align-middle"></div>
WFull
Add the class to specify that the element get a width of 100%.
Type | Default Value |
---|
bool | false |
<NVBlock WFull></NVBlock>
<div class="w-full"></div>
WhiteSpace
Set the white spacing of the element.
Type | Default Value |
---|
string | null |
<NVBlock WhiteSpace="@WhiteSpace.NOWRAP"></NVBlock>
<div class="whitespace-nowrap"></div>
Width
Add width in the inline style of the element.
Type | Default Value |
---|
string | null |
<NVBlock Width="100px"></NVBlock>
<div style="width:100px;"></div>
<NVBlock Width="50%"></NVBlock>
<div style="width:50%;"></div>
<NVBlock Width="50vw"></NVBlock>
<div style="width:50vw;"></div>
Wrap
Set the wrapping of a flex container.
Type | Default Value |
---|
string | null |
<NVBlock Wrap="@Wrap.WRAP"></NVBlock>
<div class="flex-wrap"></div>
<NVBlock Wrap="@Wrap.NOWRAP"></NVBlock>
<div class="flex-nowrap"></div>
<NVBlock Wrap="@Wrap.REVERSE"></NVBlock>
<div class="flex-wrap-reverse"></div>
XL
XL parameters apply specified parameters when the screen has the extra large breakpoint width.
(xl breakpoint: between 1280px and above),
Type | Default Value |
---|
object | null |
XL2
XL2 parameters apply specified parameters when the screen has the double extra large breakpoint width.
(2xl breakpoint: between 1536px and above),
Type | Default Value |
---|
object | null |
ZIndex
Set the z-index of the element.
Type | Default Value |
---|
string | null |
<NVBlock ZIndex="0"></NVBlock>
<div style="z-index:0;"></div>