togglehandler

noun
UK /ˈtɒɡ.əlˌhæn.dlər/
US /ˈtɑː.ɡəlˌhæn.dlɚ/

A togglehandler is a helper that flips something on or off when you click it.

The togglehandler switched the lamp on when she tapped the button.


OTHER MEANINGS

2. A piece of computer code that responds when a toggle control is used.

The developer attached a togglehandler to the settings switch.

3. A person or tool that operates a two-position lever or switch.

The togglehandler on the machine kept the conveyor moving smoothly.

4. A function that changes a setting between two states, such as on and off.

Each togglehandler in the app remembers whether dark mode is active.