Param Panel

Checkbox

A boolean toggle control.

The checkbox is a boolean value control.

Try it

Usage

const enabled = pp.checkbox({
  label: "Enabled",
  value: true,
});

Configuration

interface CheckboxConfig extends BaseControlConfig {
  value: boolean;
}

interface CheckboxControl extends ValueControl<boolean, CheckboxConfig> {}

Reacting to changes

enabled.subscribe((value) => {
  renderer.enabled = value;
});

Toggling programmatically

There is no dedicated toggle() method — reading and inverting is already clear:

enabled.set(!enabled.get());

(A toggle() helper may be added later purely for ergonomics.)

On this page