Toggle is a control that allows people to manage the state of content or a view. It has two positions, on and off. It should be used sparingly and only when it makes sense for users to use the toggle to manage the current state. When the toggle is used in this way it helps to make sure the current state is clearly understood. The toggle should not rely solely on color to convey meaning – this is a violation of WCAG best practice. Use a toggle when it is appropriate and when a different type of control (checkbox, radio button, etc) would be more inappropriate.
A common mistake is to use a toggle for a download switch. In this case, the toggle can mislead users because it doesn’t undownload content after the switch is turned off. Instead, this type of behavior should be handled using a progress bar or some other form of animation.
Savvy teams treat Feature Toggles as inventory that comes with a carrying cost and actively seek to keep their inventory low. This often means proactively adding toggle removal tasks to the team backlog or building the process into your management platform. It also means ensuring that you have an infrastructure in place that can dynamically re-configure the specific service instance on which a toggle is deployed. This is important because a failure to do so can have a significant impact on the cycle time of your testing and validation processes.