Components · Inputs
Checkbox
One checkbox. Bind checked with { "$bindState": "/path" } to share it with other elements.
ExamplesLink to this section
Tick the box: the text below reads the same state path.
Nobody will be told.
Show JSONHide JSON
{
"version": 1,
"root": "page",
"elements": {
"page": {
"type": "Stack",
"props": { "gap": "sm" },
"children": ["notify", "status"]
},
"notify": {
"type": "Checkbox",
"props": {
"label": "Notify the team",
"description": "A reminder only; nothing is sent.",
"checked": { "$bindState": "/notify" }
}
},
"status": {
"type": "Text",
"props": {
"tone": "muted",
"size": "sm",
"text": {
"$cond": { "$state": "/notify" },
"$then": "The team will be told.",
"$else": "Nobody will be told."
}
}
}
},
"state": { "notify": false }
}PropsLink to this section
Generated from the zod schema the server validates with. Unknown props are ignored with a warning. Any prop can also be a dynamic value such as { "$state": "/path" }; it is checked again once it resolves.
| Prop | Type | Limits and defaults |
|---|---|---|
| labelrequired | string | max 200 chars |
| checked | boolean | — |
| description | string | max 400 chars |
RulesLink to this section
- Inputs change only the spec's own state, on the reader's page. Nothing is saved or sent.
Children and eventsLink to this section
Checkbox is a leaf: it does not show children. Validation warns when a leaf has some; wrap them in a Stack or Card instead.
Events: change. Bind one with on to run a state action; see Actions.