DEV Community

Discussion on: Should a button communicate the current state, the intended behavior, or both?

jeyj0 profile image
Jannis Jorre

I don't think the label for switches should change between states. That is always something that confuses me:
[ON] Do something
[OFF] Don't do something
When seeing the first it's clear: right now "do something" is on, so it'll be done. But the second isn't: "don't do something" is off - does that mean it will now be done? Or not?
If the text were to stay constant, I can switch "Do something" on or off, which makes it really clear in my opinion.

Also, always use the positive clause to avoid double negations.
Do: [y/n] do something
Don't: [y/n] don't do something.
The second could lead to "not don't do something" when read out, which doesn't make much sense. "Yes, do something" and "Not do something" make more sense. :)