io.input.boolean
Yes or no, with a checkbox.
io.input.boolean asks a yes or no question with a checkbox. The handler gets true when the box is checked and false when it is not. Good for a choice that goes along with the action, such as emailing the customer.
The simplest one
The whole action file, and roughly what your team sees when it runs.
Cancel order
What you can set
The settings you will reach for most, each with the line of code that turns it on.
What checking means. The help text sits to the right of the box and says what a tick does. Every checkbox has one.
Checked from the start. The box starts empty. With defaultValue: true it starts checked.
True or false. The handler gets a boolean. An empty box is a valid answer, so nothing is checked on the way.
A box that must be ticked. .validate() can refuse an empty box with your message. The person answers again until it passes.
Shown, not changed. With disabled the box shows its value and cannot be changed. The handler gets that value whatever the browser sends.
Next to other fields. Inside io.group the checkbox shares one form with other fields. The handler gets all the values together.
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.