MtTextarea component provides a multi-line text input area with character counting and validation.
Import
Props
v-model binding for the textarea value.
Label text for the textarea.
Placeholder text displayed when empty.
Disables the textarea.
Marks the field as required.
The name attribute for the textarea.
Help text with additional information.
Maximum number of characters allowed. Shows character counter when set.
Error object with a detail property.
Indicates if the value is inherited.
Enables inheritance functionality.
Events
Emitted when the textarea value changes.
Emitted when the textarea loses focus.
Emitted when the textarea gains focus.
Emitted when the textarea loses focus.
Emitted when inheritance is removed.
Emitted when inheritance is restored.
Slots
Additional hint content below the textarea.
Usage
Basic Textarea
With Character Limit
Required Textarea
Disabled Textarea
With Custom Hint
Multiple Textareas
Styling
The textarea has a default minimum height of 125px and maximum height of 300px. Users can resize it vertically within these bounds.Accessibility
- Uses native textarea element
- Label properly associated via
forattribute - Error messages linked via aria-describedby
- Character count visible and announced
- Focus visible outline for keyboard navigation
- Disabled state prevents interaction
- Required fields marked with asterisk
- Resizable for user preference