What is a Toggle?

Togle

Toggle is a verb and a noun: it refers to a hardware switch that has two positions, on and off, or the way you flip between screens during a video call. It also describes the way we shift between settings or programs, for example when using a web browser on two computers at once.

A toggle is a control that doesn’t explicitly contain text on/off and thus relies on other visual cues to be understood by users. Picking the right ones is not as straightforward as it seems, and misusing them can cause more harm than good.

The most common use of toggles is to perform A/B or multivariate testing. By placing each user into one of a set of cohorts at runtime and sending them down one codepath or another (via the Toggle Router) we can measure the impact of changes to things like ecommerce purchase flows, Call To Action wording and even menu item placement.

The most important thing to remember when working with toggles is that they only work if they are set up correctly at runtime. This is why it’s important for teams to test the toggle configuration that they plan to release, along with any toggles they intend to keep flipped Off. This approach can be a bit cumbersome in the short term and can lead to an increase in overall testing cycle time as re-deployment of a toggle is required whenever a change needs to be made. This is why a more dynamic approach to toggle configuration such as via a dynamic in-memory re-configuration system would be preferable for real production deployments.