Builtin Library
README.md
checkbox
Check-mark style boolean input with a trailing label.
Exports
checkbox(label: string?, id: string?, checked: any?, opts: CheckboxOpts?) -> WidgetNode— build a checkbox widget node.
Types:
CheckboxOpts = { props?, onChange?, style? }
Usage
local checkbox = require("@builtin::modules.zui.widget.checkbox")
checkbox("Enabled", "cb1", true, { onChange = "cb1:change" })
Notes
- Initial
checkedis coerced viavalue == true— anything that isn't strictlytruebecomesfalse. onChangereceives aValueChanged(boolean)event when the user toggles the box.