In everyday technology, toggle switches are used to turn features on and off. They are commonly found in mobile devices, computers and programming applications where they switch between different modes or settings. Toggles enforce a mutually exclusive state — on or off — and are usually designed with contextual cues that make the current state obvious to users.
For example, Google’s recent rollout of a new “delete all activity” button makes it easy to clear out your digital footprint and start over. All you need to do is click on the option and Google will wipe your slate clean (although they can’t guarantee that those late-night searches for exotic vacation destinations or obscure trivia won’t pop up again).
When using toggles in user interfaces, remember to use direct labels, standard visual design, and deliver immediate results. Also, be sure to follow WCAG guidance that suggests that you shouldn’t rely on only color for meaning — instead use meaningful icons and labeling in combination.
When testing feature toggle configurations, it’s important to test the actual toggle configuration that will be deployed in production. This often means testing with all of the toggles that will be released flipped on and also running some tests with all of the toggles flipped off to avoid surprise regressions in future releases.