Skip to content

Checkbox Widget ​

A toggleable checkbox.

Import ​

zig
const tui = @import("tui");
const Checkbox = tui.Checkbox;

Usage ​

zig
var check = Checkbox.init("Enable Logging", null);

Initial State ​

zig
check.setChecked(true);

Checking State ​

zig
if (check.isChecked()) {
    // ...
}

Styling ​

You can customize the checked/unchecked symbols and styles.

Released under the MIT License.