4 ms·
I won't argue against the value of a native slide toggle, but they have different semantics compared to a checkbox, in my opinion, and you shouldn't use a slide
by NoSorryCannot 5y ago
I won't argue against the value of a native slide toggle, but they have different semantics compared to a checkbox, in my opinion, and you shouldn't use a slide everywhere you had used a checkbox.
Slide toggles would be completely bizarre on a survey, for example. "ah yes I'll just turn on 'member of the armed forces'"
- dheera 5y agoSo provide it as an option damnit! I wasn't suggesting getting rid of checkboxes not sure why everyone makes that assumption <input type="checkbox" ...> <input type="slide_toggle" ...> <input type="range" min="0" max="1000" step="5"> <input type="color"> .... You can have whatever you want, just saying, make modern UI native components accessible via HTML without some CPU-intensive div-react-polyfill-javascript fluff. It's ridiculous that if you need to implement a slide toggle, which is available as a native component, that you try to emulate the shit out of it with some images and CSS and javascript and more div hell for the sliding animation and then even more div hell for the little radiating animation instead of just dropping in the native widget which will do all of that and at way better fps than your emulated version.
- soylentgraham 5y agoInstead of all that hell; just use a checkbox.
- dheera 5y agoPecking accurately at checkboxes while trying to keep your balance on a commuter train is not fun. Slide toggles are much easier to hit accurately. They also are visually easier to understand as an on-off switch. Often people tend to go for design anti-patterns with checkboxes like [X] Mute notifications [X] Large fonts Whereas with slide toggles the on-off semantics are much more obvious and design patterns tend to get forced to a better, simplified pattern: [o--] Notifications [--o] Large fonts (where the toggle is clearly lit up for the "on" state of course)