Diwa Design System

Textarea

A multi-line text input for longer freeform content. Supports validation states, labels, descriptions, and resizing.

Properties

NameTypeDefaultDescription
labelstring''Visible label text. Always provide a label for accessibility.
descriptionstring''Supplementary description below the label.
state'none' | 'error' | 'success''none'Validation state affecting border and message colour.
messagestring''Feedback message shown when state is "error" or "success".
namestring''Native name attribute for form submission.
valuestring''Current value. Update in response to the input event (controlled).
placeholderstring''Placeholder text shown when the textarea is empty.
requiredbooleanfalseWhether the field is required.
disabledbooleanfalseDisables all interaction.
readOnlybooleanfalseMakes the content non-editable while still selectable.
maxLengthnumberMaximum number of characters allowed.
minLengthnumberMinimum number of characters required.
rowsnumber4Number of visible text rows.
resize'none' | 'both' | 'vertical' | 'horizontal''vertical'Which resize handles are shown.
compactbooleanfalseEnables dense mode with reduced padding and font size.
hideLabelbooleanfalseHides the label visually; the label is still used as the accessible name.
theme'dark' | 'light''dark'Per-component theme override.

Events

NameDetail typeBubblesDescription
inputstringYesEmitted on every keystroke with the current value.
changestringYesEmitted when the textarea loses focus and the value has changed.
blurFocusEventNoEmitted when the textarea loses focus.

Slots

SlotDescription
label-afterContent placed after the label text, e.g. a diwa-popover for additional help.