HxInputTextArea #

Textarea. To set a custom height, do not use the rows attribute. Instead, set an explicit height (either inline or via custom CSS).

Basic usage #

<EditForm Model="model" OnValidSubmit="HandleValidSubmit">
    <DataAnnotationsValidator />
    <HxInputTextArea @bind-Value="model.Text" />
    <HxSubmit Text="Submit" Color="ThemeColor.Primary" />

LastSubmit: @lastSubmit

    private Model model = new Model();
    private DateTime? lastSubmit;

    private Task HandleValidSubmit()
        lastSubmit = DateTime.Now;
        return Task.CompletedTask;

    public class Model
        public string Text { get; set; }


Parameters #

Name Type Description
AdditionalAttributes IReadOnlyDictionary<string, object> A collection of additional attributes that will be applied to the created element.
BindEvent BindEvent Gets or sets the behavior when the model is updated from the input.
ChipTemplate RenderFragment The chip template.
CssClass string The custom CSS class to render with the wrapping div.
DisplayName string Gets or sets the display name for this field.
This value is used when generating error messages when the input value fails to parse correctly.
Enabled bool? When null (default), the Enabled value is received from the cascading FormState. When the value is false, the input is rendered as disabled. To set multiple controls as disabled, use HxFormState.
GenerateChip bool When true, HxChipGenerator is used to generate chip item(s). The default is true.
Hint string The hint to render after the input as form-text.
HintTemplate RenderFragment The hint to render after the input as form-text.
InputCssClass string The custom CSS class to render with the input element.
InputGroupEndTemplate RenderFragment Input group at the end of the input.
InputGroupEndText string Input group at the end of the input.
InputGroupStartTemplate RenderFragment Input group at the beginning of the input.
InputGroupStartText string Input group at the beginning of the input.
InputMode InputMode? Hint to browsers as to the type of virtual keyboard configuration to use when editing.
The default is null (not set).
InputSize InputSize? Size of the input.
Label string The label text.
LabelCssClass string The custom CSS class to render with the label.
LabelTemplate RenderFragment The label content.
LabelType LabelType? Label type.
MaxLength int? The maximum number of characters (UTF-16 code units) that the user can enter.
If the parameter value isn't specified, the MaxLengthAttribute of the Value is checked and used.
If not specified either, the user can enter an unlimited number of characters.
Placeholder string Placeholder for the input.
Settings InputTextSettings Set of settings to be applied to the component instance (overrides HxInputText.Defaults, overridden by individual parameters).
Type InputType Input type.
ValidationMessageMode ValidationMessageMode? Specifies how the validation message should be displayed.
The default is ValidationMessageMode.Regular, you can override the application-wide default for all inputs in Defaults.
Value string Value of the input. This should be used with two-way binding.
ValueChanged EventCallback<string> A callback that updates the bound value.
ValueExpression Expression<Func<string>> An expression that identifies the bound value.

Methods #

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

Static properties #

Property Type Description
Defaults InputTextSettings Application-wide defaults for the HxInputFile and derived components.
Full documentation and demos: https://havit.blazor.eu/components/HxInputText.
An unhandled error has occurred. Reload 🗙