Skip to main content

CheckBox

A little box you can check or leave unmarked.

It is mainly used to select or deselect one item from a list of multiple items that the user can choose from.


Config is a struct of the following type:

struct {
/// Whether the check box has a small tick inside
/// ☒ true
/// ☐ false
checked: bool = false,
/// The label that shows next to your check box
label: []const u8 = "",
/// Whether the user can interact with the check box or not
enabled: bool = true,
};

Functions

None specific to this component.

Properties

NameTypeDescription
label[]const u8The label that shows next to your check box
checkedboolWhether the check box has a small tick inside
enabledboolWhether the user can interact with the check box or not

Examples

CheckBox(.{ .label = "Be awesome" })