HxFormValue

Displays a read-only value in the form control visual (as .form-control, with label, border, etc.).

Basic Usage

Value
<HxFormValue Label="Label" Value="Value" />

Sizing

Large
Regular
Small

Custom Content

You can render any custom content using the ValueTemplate.

Bad value

Input Groups

Text or custom HTML can be added to the start or to the end of an input through InputGroups. Learn more here.

$
Value
.00

API

Parameters

Name Type Description
CssClass string Custom CSS class to render with wrapping div.
Hint string Hint to render after input as form-text.
HintTemplate RenderFragment Hint to render after input as form-text.
InputGroupEndTemplate RenderFragment Input-group at the end of the input.
InputGroupEndText string Input-group-text at the end of the input. In comparison to IFormValueComponentWithInputGroups.InputGroupEndTemplate this property is rendered as .input-group-text.
InputGroupStartTemplate RenderFragment Input-group at the beginning of the input.
InputGroupStartText string Input-group-text at the beginning of the input. In comparison to IFormValueComponentWithInputGroups.InputGroupStartTemplate this property is rendered as .input-group-text.
InputSize InputSize? Size of the input.
Label string Label to render before input (or after input for Checkbox).
LabelCssClass string Custom CSS class to render with the label.
LabelTemplate RenderFragment Label to render before input (or after input for Checkbox).
Settings FormValueSettings Set of settings to be applied to the component instance (overrides HxFormValue.Defaults, overriden by individual parameters).
Value string Value to be presented.
ValueCssClass string Custom CSS class to render with the value.
ValueTemplate RenderFragment Template to render value.

Methods

Method Returns Description
RenderValue(RenderTreeBuilder builder) void Renders content of the component (value, input).

Static properties

Property Type Description
Defaults FormValueSettings Application-wide defaults for HxFormValue and derived components.
An unhandled error has occurred. Reload 🗙