Form Field Textarea
A pre-composed form field that wraps a Textarea control with automatic label, helper text, and error message display. Inherits from FormFieldBase, which provides EditContext integration, auto-generated control IDs, ARIA attribute wiring, and validation error state management.
Default
A basic
FormFieldTextarea with a label, helper text, and two-way binding via @bind-Value. The component automatically generates a unique ID to associate the label with the textarea for accessibility.Describe the item in detail
Characters: 0
Character Count
Set
ShowCharacterCount to true with a MaxLength to display a character counter below the textarea. The counter updates in real time as the user types.0/500
With Error
Use
ErrorText to manually set a validation error. Click Validate to trigger the error when the textarea is empty.Disabled
Set
Disabled to true to prevent user interaction. The textarea displays with reduced opacity.This field is read-only.
Debounced Updates
Set
UpdateTiming to UpdateTiming.Debounced with a DebounceInterval to delay value updates until the user stops typing. This is useful for reducing re-renders during rapid input.Value updates 300ms after you stop typing.
Current value: (empty)
EditForm Validation
Inside an
EditForm, validation errors from DataAnnotationsValidator display automatically. Try submitting without entering any comments.Public Methods
Use a component reference (@ref) to call this method programmatically.
| Method | Returns | Description |
|---|---|---|
| FocusAsync() | ValueTask | Moves keyboard focus to the underlying textarea element. Call via @ref — no JS interop needed. |