DDS/Components/Textarea

Textarea

Form

Multi-line text input with resizing options.

Playground

Controls

Placeholder text.

Number of visible rows.

Resize direction.

Disable input.

Error state.

Props

PropTypeDefaultDescription
placeholderstringPlaceholder text.
modelValuestringv-model value.
rowsnumber4Number of visible rows.
resize'none' | 'vertical' | 'horizontal' | 'both''vertical'Resize handle.
disabledbooleanfalseDisabled state.
errorbooleanfalseError state.
readonlybooleanfalseReadonly 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.