Textarea
FormMulti-line text input with resizing options.
Playground
Controls
Placeholder text.
Number of visible rows.
Resize direction.
Disable input.
Error state.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
placeholder | string | — | Placeholder text. |
modelValue | string | — | v-model value. |
rows | number | 4 | Number of visible rows. |
resize | 'none' | 'vertical' | 'horizontal' | 'both' | 'vertical' | Resize handle. |
disabled | boolean | false | Disabled state. |
error | boolean | false | Error state. |
readonly | boolean | false | Readonly mode. |
Examples
Default
vue
<DsTextarea placeholder="Write something..." />No resize
vue
<DsTextarea
placeholder="Fixed size"
resize="none"
/>Error
vue
<DsTextarea
placeholder="Invalid"
error
/>Disabled
vue
<DsTextarea
placeholder="Disabled"
disabled
/>Skeleton
Use DsTextareaSkeleton as a loading placeholder while content is being fetched.
Default
vue
<DsTextareaSkeleton />With Label
vue
<DsTextareaSkeleton hasLabel />Tall
vue
<DsTextareaSkeleton :rows="6" />Accessibility
- Always pair with a DsLabel using matching id/for attributes.
