Use checkbox_input() for form confirmations and multi-option flags, and switch_input() for instant on/off feature toggles.
checkbox_input()
switch_input()
<ComponentPreview title="Checkbox & Switch">
[
{"type": "checkbox_input", "label": "Stream tokens in real time", "checked": true, "name": "stream"},
{"type": "switch_input", "label": "Auto-save chat sessions", "checked": true, "name": "autosave"},
{"type": "switch_input", "label": "Require human approval for shell tools", "checked": false, "name": "approval"}
]
</ComponentPreview>
<Tabs>
<Tab title="Python">
</Tab>
<Tab title="YAML">
</Tabs>
| Component | Parameter | Description |
|---|---|---|
| checkbox_input | label, checked, name, auto_submit | Boolean checkbox control. |
checkbox_input
label
checked
name
auto_submit
| switch_input | label, checked, name, auto_submit | Accessible toggle switch (role="switch"). |
switch_input
role="switch"