Textarea
Textarea is a styled multi-line text input with v-model support, error/hint messaging, and disabled state.
Basic usage
vue
<Textarea v-model="notes" placeholder="Enter notes..." />With label
vue
<FormGroup label="Notes" for="notes">
<Textarea id="notes" v-model="notes" placeholder="Add any additional context..." />
</FormGroup>Rows
Control the initial height with rows (maps to the native rows attribute):
rows="2"
rows="6"
vue
<Textarea v-model="description" :rows="2" />
<Textarea v-model="description" :rows="6" />Textareas are vertically resizable by default (resize-y).
Error state
This field is required
vue
<Textarea v-model="body" :error="errors.body" />Hint text
Max 500 characters.
vue
<Textarea v-model="bio" hint="Max 500 characters." />Disabled
vue
<Textarea v-model="value" :disabled="true" />Props
| Prop | Type | Default | Description |
|---|---|---|---|
modelValue | string | — | Value (use with v-model) |
placeholder | string | — | Placeholder text |
rows | number | 3 | Initial number of visible rows |
error | string | — | Error message — shows danger border + text below |
hint | string | — | Hint text below (hidden when error is set) |
disabled | boolean | false | Disables the textarea |
Events
| Event | Payload | Description |
|---|---|---|
update:modelValue | string | Emitted on every keystroke |