io.input.url
A web address, handed over as a URL.
io.input.url asks a person for a web address. The handler gets a URL, not a string. Read the host or the path from it right away. Only http and https get through unless you say otherwise.
The simplest one
The whole action file, and roughly what your team sees when it runs.
Add store
What you can set
The settings you will reach for most, each with the line of code that turns it on.
A URL, not a string. Read hostname, pathname or searchParams straight from the answer. href gives the text.
Only the schemes you allow. allowedProtocols lists the schemes the address may use. Without it, http and https.
Checked twice. Something that is not a web address comes back with a message. The server checks every answer, so the browser cannot skip it.
Your own rule. .validate() gets the URL after the built-in checks. Return a message to turn the address down.
Starts filled. defaultValue takes a string or a URL. With disabled: true the person sees it but cannot change it.
Or optional. .optional() lets the field stay empty. The handler then gets URL | undefined.
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.