What is a Toggle?

A toggle is a binary switch that enables users to quickly choose between two different states. It is commonly used for “on/off” switches.

Feature toggles are used when you want to test new features with your users without risking the production environment. By enabling a feature toggle, you can bucket your users into two groups: the group that sees the new tested feature when it is toggled ON, and the group that sees the old version of the product when the toggle is toggled OFF.

Toggle switches should always have a clear label text that explains what the switch does, as well as a clearly visible action text. The action text should also be a verb and appended with an on/off suffix so the user knows what state the switch is currently in.

For example, if you want to toggle a feature that allows your users to view time entries as they are tracked, the action text would be something like “Track time now”. This way, your users will know what the switch does and what state it is in, so they can make an informed decision about whether or not they should use the feature.

There are some limitations on what can be toggled, including article sections, containers, images, maps, key/value items, prompt linked articles, quotes, and aloud boxes. Also, any toggable section that contains a mention link to another article will not work properly. For these reasons, you should consider using secrets or subscriber containers instead if you need to hide content from viewers.