Form
Textarea
A multi-line text box on the same field chrome as InputText, that can grow with its content.
WAI-ARIA tested
Import
main.ts
import { Textarea } from '@vitral/vue';Basic
0 / 280
Auto resize
No scrollbar and no handle: the height follows the text.
Sizes, variants and states
Fluid
API
Read from packages/vue/src/components/Textarea/types.ts, so it says what the component actually accepts.
Props
| Name | Type | Description |
|---|---|---|
| size | Size | — |
| variant | InputVariant | Defaults to the plugin's `inputVariant`. |
| invalid | boolean | — |
| disabled | boolean | — |
| readonly | boolean | — |
| fluid | boolean | — |
| autoResize | boolean | Grows with its content instead of scrolling, and drops the resize handle. |
| rows | number | Visible lines of text; with `autoResize`, the height it starts from and never shrinks below. |
| resize | 'vertical' | 'horizontal' | 'both' | 'none' | Which way the reader may drag the grip. Defaults to the theme's, which is `vertical`: a field that fills its container has nowhere to go sideways. `both` suits one with a width of its own. `autoResize` takes the grip away entirely, since the box is already deciding its own height. |
Plus pt, dt and unstyled from BaseProps, see pass-through and unstyled mode.