Textarea
A multi-line text field for longer input.
<template> <Textarea placeholder="Type your message here." :rows="3" /></template>Props
| Name | Type | Default |
|---|---|---|
| size | "md" | "sm" | "md" |
| error | boolean | false |
| modelValue | string | number | - |
| rows | number | 3 (UTextarea's own default) |
| autoresize | boolean | false |
| ...props | UTextarea props (placeholder, disabled, maxrows, color, variant, icon, ...) | - |
Guidelines
Do
- Use for multi-line free text input - a message, a description, feedback.
- Pair with a label and, if the input isn't obviously understood, a caption below explaining the expected format.
- Inside a
UFormField, a validation error puts the field on the error surface by itself. Passerrorfor a state the form doesn't know.
Don't
- Don't use for a single line of text - use
Inputinstead. - Don't rely on the resize handle alone to fit long content - set
rows/autoresizeso the field starts at a sensible height.