Version v3 Documentation
You are viewing documentation for an older version.
View latest (v4) documentation →
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.
Loading example…
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.
Loading example…
With Error
Use
ErrorText to manually set a validation error. Click Validate to trigger the error when the textarea is empty.
Loading example…
Disabled
Set
Disabled to true to prevent user interaction. The textarea displays with reduced opacity.
Loading example…
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.
Loading example…
EditForm Validation
Inside an
EditForm, validation errors from DataAnnotationsValidator display automatically. Try submitting without entering any comments.
Loading example…
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. |