A base class for form input components. This base class automatically integrates
with a Microsoft.AspNetCore.Components.Forms.EditContext, which must be supplied
as a cascading parameter.
Extends the InputBase class.
Adds support for rendering bootstrap-based input with a validator.
See also https://getbootstrap.com/docs/5.3/forms/overview/.
| Name | Type | Description |
|---|---|---|
| AdditionalAttributes | IReadOnlyDictionary<string, object> |
A collection of additional attributes that will be applied to the created element. |
| 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 |
| 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. |
| Label | string |
The label text. |
| LabelCssClass | string |
The custom CSS class to render with the label. |
| LabelTemplate | RenderFragment |
The label content. |
| 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 | TValue |
Value of the input. This should be used with two-way binding. |
| ValueChanged | EventCallback<TValue> |
A callback that updates the bound value. |
| ValueExpression | Expression<Func<TValue>> |
An expression that identifies the bound value. |
| Property | Type | Description |
|---|---|---|
| Defaults | InputSettings |
Application-wide defaults for the HxInputBase and derived components. |