What is a Feature Toggle?

Togle

A toggle is a small piece of wood or plastic that is sewn to something such as a coat or bag and is pushed through a loop or hole to fasten it. The term is also used in computing to refer to a switch that can be moved between two states: on or off.

Feature Toggles make it easy to test assumptions and encourage teams to be more experimental. When an engineer’s hypothesis about how to improve a product can be quickly proven or disproven it makes the team feel more invested in the experiment and more willing to try new things.

Toggle switches allow you to hide, switch or change the appearance of different content through a simple uk-toggle attribute added to button> or a> elements. It can be applied to a single element or to a group of them, and can use any selector as its target.

The toggle state is signaled by a color change and it’s important to consider contrast and cultural differences when selecting an on/off indicator. For example using red for on may be counterintuitive in some cultures who associate it with stop signs or traffic lights.

Toggle configuration is typically managed via static files but at a certain scale this can become cumbersome. To address this, many organizations move the toggle configuration into some form of centralized store, often an existing application DB. This is usually accompanied by the build-out of some form of admin UI for system operators, testers and product managers to view and modify features flags and their toggle configuration.