io.input.textarea
Longer text, over as many lines as it takes.
io.input.textarea asks a person for text that can span several lines. Use it for a reason, a note or a message. The handler gets a string with the line breaks the person typed. The server checks every answer before your code goes on.
The simplest one
The whole action file, and roughly what your team sees when it runs.
Refund payment
What you can set
The settings you will reach for most, each with the line of code that turns it on.
As tall as you need. lines sets the visible height, four unless you say otherwise. The person can still drag the field bigger.
Line breaks kept. The handler gets a string with the line breaks the person typed, as \n.
Length limits. Set the fewest and the most characters. A wrong length comes back with a message under the field.
Your own check. .validate() runs on the server after the built-in checks. Return a message and the person writes again.
Or optional. .optional() lets the field stay empty. The handler then gets string | undefined.
Next to other fields. Inside io.group it is one field of a form. One Continue sends them all.
More in the docs
This page shows the idea. The docs have every prop, the checks on the server and more examples.
Next components
Three more calls on io. Each one shows a control and hands your code a typed value.
Write your first tool today.
An async function, a few await calls, and the form is in the browser.