A multi-line labeled text field with optional helper text, error and character count.
A Markdown brief for Claude, Cursor or v0: install, setup, props and a complete example.
For longer text: a description, a note, a message.
One short line? Text Input.
Labeled like Text Input. The character count is part of the field’s description, so it is read with the field.
import { TextArea } from '@idyeah/diya'Stable since 1.0.0
labelRequiredstringVisible label above the textarea; also its accessible name. Hide it with hideLabel.
defaultValuestringThe starting text when uncontrolled; a form reset returns to it.
errorstringVisible error message below the textarea; marks the field invalid while set.
helperTextstringVisible hint below the textarea, announced with it; error replaces it while set.
hideLabelbooleanHides the label visually but keeps it as the textarea's accessible name.
Default false
onValueChange(value: string) => voidCalled with the new text on every edit.
resizablebooleanLets people drag the textarea taller; defaults to true.
Default true
showCountbooleanShows a visible character count below the textarea, as "n / maxLength" when maxLength is set.
size"small" | "medium" | "large"Type size and padding; defaults to 'medium'.
Default 'medium'
valuestringThe current text when controlled; pair it with onValueChange.
Also takes every native <textarea> attribute, such as name, id or data-*.