Textarea
A multi-line text input field for longer free-text responses with optional length validation.
The Textarea field renders a resizable multi-line text input, ideal for collecting longer responses such as comments, descriptions, or feedback. It supports variable interpolation in the placeholder and length-based validation.
For the shared properties available on all fields (label, help, note, key, width, visual styling, required), see the Form Fields Overview.
Configuration
| Property | Type | Default | Description |
|---|---|---|---|
| placeholder | string | "Enter text" | Ghost text shown inside the input when empty. Supports "{{variable}}" interpolation. |
| validations.minLength | number | -- | Minimum number of characters the user must enter |
| validations.maxLength | number | -- | Maximum number of characters allowed |
Validation
The Textarea field extends InputFieldBase, so the required toggle is available. Length constraints (minLength / maxLength) are enforced on submit.
Unlike the Text field, Textarea does not expose regex pattern validation in its editor, since multi-line content rarely needs pattern matching.
Example Usage
A feedback form that requires at least 20 characters:
{
"type": "textarea",
"label": "Your Feedback",
"required": true,
"placeholder": "Tell us what you think...",
"validations": {
"minLength": 20,
"maxLength": 2000
}
}