Toggle is a simple user-interface component that lets people manage the state of content or views. When used correctly it is a powerful tool for providing a rich feature set in a small footprint. However, like any tool it can be misused so we recommend keeping toggle switches limited to use cases where they will be clearly and efficiently understood by users. When using toggles, provide clear and direct labels, use standard visual design and evaluate the societal and cultural implications.
Toggles are also a great way to perform A/B testing on your live product. By exposing an experiment toggle to different cohorts you can send the same user down two different codepaths and learn which is more effective.
Lastly, toggles are great for managing access to complex features that need to be rolled out gradually. This category of Feature Toggle is often known as a Champagne Brunch release or a Permissioning Toggle. Because these types of features are primarily managed at the permission level they tend to be much longer lived compared to other categories of Feature Toggle — in some cases multiple years.
As you plan to deploy a new toggle, it is important to thoroughly test both the live and fallback configurations of the feature. Many teams suggest that you test the toggle configurations you expect to roll out in production (including any Default Toggle that may be enabled) with all of the associated features flipped On. This helps ensure that existing or legacy behavior is enabled when a toggle is On and doesn’t interfere with your intended future behaviors when a toggle is Off.