HxInputText

Text input (also password, search, etc.)

InputText content:
<HxInputText @bind-Value="inputTextContent" />

InputText content: @inputTextContent

@code {
    private string inputTextContent;
}

Password

Password:
<h3>Password</h3>

<HxInputText @bind-Value="inputTextContent" Type="InputType.Password" />

Password: @inputTextContent

@code {
    private string inputTextContent;
}

API

Parameters

Name Type Description
Type InputType Input type.
Placeholder string Placeholder for the input.
InputSize InputSize?
LabelType LabelType? Label type.
InputGroupStartText string Input-group at the beginning of the input.
InputGroupStartTemplate RenderFragment Input-group at the beginning of the input.
InputGroupEndText string Input-group at the end of the input.
InputGroupEndTemplate RenderFragment Input-group at the end of the input.
Label string Label to render before input (or after input for Checkbox).
LabelTemplate RenderFragment Label to render before input (or after input for Checkbox).
Hint string Hint to render after input as form-text.
HintTemplate RenderFragment Hint to render after input as form-text.
CssClass string Custom CSS class to render with wrapping div.
LabelCssClass string Custom CSS class to render with the label.
InputCssClass string Custom CSS class to render with the input element.
ShowValidationMessage bool When false, validation message is not rendered. Default is true.
GenerateChip bool When true, HxChipGenerator is used to generate chip item(s). Default is true.
ChipTemplate RenderFragment Chip template.
Enabled bool? When null (default), the Enabled value is received from cascading FormState. When value is false, input is rendered as disabled. To set multiple controls as disabled use HxFormState.
AdditionalAttributes IReadOnlyDictionary<string, object>
Value string
ValueExpression Expression<Func<string>>
DisplayName string

Event Callbacks

Name Type Description
BindEvent BindEvent Gets or sets the behavior when the model is updated from then input.
ValueChanged EventCallback<string>

Methods

Method Returns Description
FocusAsync() ValueTask Gives focus to the input element.

Static properties

Property Type Description
Defaults InputTextDefaults Application-wide defaults for the HxInputText.
An unhandled error has occurred. Reload 🗙