Boolean Configs
Learn all about boolean components.
Common booleans
Switch
The switch is the best way to represent a simple boolean. It's got both a single and dual column variant, and the option you'll use the most.
This code will create a switch like this:
Checkbox
A checkbox is the best way to represent less important booleans. It's got both single and dual-column variants.
When should you use a switch or checkbox
The switch option is intended for strict ON/OFF options, such as particles. You either see particles, or you don't. In contrast, checkboxes are intended for finer, more detailed control. Maybe you enable potion particles and disable crits.
Dual Option
Out of the three simple config components, dual options are the most unusual. It's got both single and dual-column variants.
Designers note: These exist for when a simple ON/OFF component wouldn't make sense. Such as a direction, or time of day. Essentially, a boolean that wouldn't make sense with yes/no.
Last updated