Multiline string builder. Renders a resizable text area instead of a single-line input.
- Same API as
field.text()- only the rendered input type changes - Best suited for bios, comments, issue descriptions, feedback, and any input where line breaks matter
- Pair with
min()/max()to set clear length boundaries
Bio.tsxtsx
| 1 | const schema = { bio: field.textarea('Bio').max(400) } |
Defaults, inheritance & field methods
- defaultValue is
'' - type is
textarea - Shared methods: see Base field builder
- String builder methods: see field.text()
Textarea-specific methods:
| Method | Type | Description |
|---|---|---|
- | - | field.textarea() does not add methods beyond the shared string-builder surface; it mainly swaps the renderer to a multiline input. |
Recipes
Patterns that showcase textarea-specific use cases.
Support ticket with minimum detail
SupportTicket.tsxtsx
| 1 | const schema = { |
| 2 | description: field.textarea('Description') |
| 3 | .required() |
| 4 | .min(20) |
| 5 | .max(2000) |
| 6 | .hint('Describe the issue with as much detail as possible.'), |
| 7 | } |
Bio with character budget
Bio.tsxtsx
| 1 | const schema = { |
| 2 | bio: field.textarea('Bio') |
| 3 | .max(280) |
| 4 | .trim() |
| 5 | .placeholder('Tell the community a bit about yourself'), |
| 6 | } |
Markdown-friendly notes
ReleaseNotes.tsxtsx
| 1 | const schema = { |
| 2 | releaseNotes: field.textarea('Release notes') |
| 3 | .max(5000) |
| 4 | .hint('Markdown is supported'), |
| 5 | } |