functions

CheckboxBool
Edited: Sunday 25 January 2026

CheckboxBool

Category: Components
File: form.go
Package: ui

Signature

1func CheckboxBool(btn *Clickable, value *bool) W

Description

CheckboxBool creates a checkbox that automatically toggles a boolean pointer.
This is a convenience wrapper around Checkbox for simple boolean state management.

Example:

btn := &Clickable{}
enabled := false
checkbox := CheckboxBool(btn, &enabled)  // Automatically toggles enabled

The boolean value is toggled in-place when the checkbox is clicked.

Examples

CheckboxBool

1{
2	btn := &Clickable{}
3	enabled := false
4	_ = CheckboxBool(btn, &enabled)
5}

Example Output


This documentation is auto-generated. To update, run make docs

Backlinks