On and off states
Like physical switches, interface switches can have both on and off states. The on state is immediate, taking effect right away. Color and overall appearance should change, clearly indicating whether the switch is on or off.
In the off state, the change should be immediate and the opposite of whatever the on state is. Think of how a switch can activate or turn off dark mode for example.
Regardless of what the switch does, it should be clear and explicit which direction is on and which direction is off. Note that on states (and off states) are sometimes used on UI elements other than switches, such as a button that turns a microphone or camera on and off in an app like Zoom. The same guidelines for clearly indicating the states still apply in such cases.[1]
References
- State-Switch Controls: The Infamous Case of the "Mute" Button | Nielsen Norman Group