Designing Feature Toggles


A toggle is a piece of hardware that allows a user to select between two positions. For example, a computer keyboard’s Caps Lock and Num Lock are toggle switches that can be activated to enable or disable specific functionality. A toggle switch can also be used in software to change the state of an application. For instance, many applications allow the user to turn on or off a notification status bar.

When designing a toggle it is important to consider how the button will be perceived by users. For example, using a primary visual cue like embossment as the sole indicator of activation can lead to confusion and misinterpretation (the half with the filled background was mistaken by some testers as ‘ON’). Instead, it is recommended to use the color or font size to differentiate the active and inactive states. If the toggle is in a place that requires immediate results it should be replaced with a checkbox to avoid any delays or confusion.

Savvy teams view Feature Toggles as inventory that comes with a carrying cost and seek to keep the amount of active toggles low. They make it a priority to test the toggle configuration that they expect to go live in production with any toggles they intend to release flipped Off and test any fallback configuration with all toggles flipped On. In order to minimize the risk of regressions many teams even add a task to their backlog when they introduce a new toggle or make an existing one inactive.