Components · Inputs
Textarea
A multi-line text field. rows (2-12, default 3) is the least number of lines it shows; it grows with what is typed. Bind value with { "$bindState": "/path" }; it only changes on-page state and nothing is ever sent. Takes description, error, hideLabel, disabled, and fullWidth like Input.
ExamplesLink to this section
No notes yet.
Show JSONHide JSON
{
"version": 1,
"root": "page",
"elements": {
"page": {
"type": "Box",
"props": { "gap": "sm", "maxWidth": "md" },
"children": ["notes", "count"]
},
"notes": {
"type": "Textarea",
"props": {
"label": "Notes for the reviewer",
"placeholder": "What should they look at first?",
"rows": 4,
"value": { "$bindState": "/notes" },
"fullWidth": true
}
},
"count": {
"type": "Text",
"props": {
"tone": "muted",
"size": "sm",
"text": {
"$cond": { "$state": "/notes" },
"$then": "Notes are on this page only.",
"$else": "No notes yet."
}
}
}
},
"state": { "notes": "" }
}PropsLink to this section
Generated from the zod schema the server validates with. Unknown props are ignored with a warning. Any prop can also be a dynamic value such as { "$state": "/path" }; it is checked again once it resolves.
| Prop | Type | Limits and defaults |
|---|---|---|
| labelrequired | string | max 120 chars |
| placeholder | string | max 120 chars |
| value | string | max 5,000 chars |
| rows | integer | 2–12 |
| fullWidth | boolean | — |
| description | string | max 400 chars |
| error | string | max 300 chars |
| hideLabel | boolean | — |
| disabled | boolean | — |
RulesLink to this section
- What a reader types changes only the spec's own state, on the reader's page. Nothing is saved or sent.
rowsis 2 to 12 and defaults to 3. It is the least number of lines the field shows; the field grows with what is typed.- In a spec with a bound Input or Textarea, a Link address and Markdown, Steps, and Diagram text must be written in the spec, so typed text can never reach a link.
Children and eventsLink to this section
Textarea is a leaf: it does not show children. Validation warns when a leaf has some; wrap them in a Stack or Card instead.
Events: change. Bind one with on to run a state action; see Actions.