io.input.email
An email address, checked before you get it.
io.input.email asks a person for an email address. The browser checks the format before sending. The server checks it again. The handler gets a string it can send mail to.
The simplest one
The whole action file, and roughly what your team sees when it runs.
Invite owner
What you can set
The settings you will reach for most, each with the line of code that turns it on.
Checked twice. Something that is not an address comes back with a message. The server checks every answer, so the browser cannot skip it.
No stray spaces. The handler gets a string. The spaces around the address are gone.
Your own rule. .validate() runs on the server after the format check. Return a message to turn the address down, such as one outside your company.
A hint inside and under. placeholder shows in the empty field. helpText says what the address is for.
Or optional. .optional() lets the field stay empty. The handler then gets string | undefined.
Shown, not changed. defaultValue fills the field in. With disabled it shows the address and the handler gets it whatever the browser sends.
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.