News for hackers. Stuff that matters.
Re:Show HN: An HTML/CSS/JS toggle switch with happy and sad ... by catshirt on Wednesday March 15, 2017 @07:15AM (#13875278)
what is a "slider toggle"? sliders should be used for ranges of values. checkbox for toggling values.

we could argue it's unfortunate that iOS(?) decided to start making their "checkboxes" look a little like sliders, but they still only toggle values thus you don't slide them.

in any case, i get where you're coming from. using mousedown instead of click or up maybe kind of solves both use cases?

Re:Show HN: An HTML/CSS/JS toggle switch with happy and sad ... by extra88 on Wednesday March 15, 2017 @07:43AM (#13875412)
"Checkboxes" that look like little sliders usually are good UI because they avoid this confusion, "is the control showing me the current state or the option to change to the desired state?" For whatever reason, toggle switches like this better convey that they're displaying the current state before you touch them.
Re:Show HN: An HTML/CSS/JS toggle switch with happy and sad ... by falsedan on Wednesday March 15, 2017 @08:13AM (#13875520)
The slide is so big on this one that it looks like multiple targets. The iOS ones are small enough that the only useful interaction is to mash with fingertip.

mousedown++ but also touch events

Re:Show HN: An HTML/CSS/JS toggle switch with happy and sad ... by OJFord on Wednesday March 15, 2017 @07:44AM (#13875415)
People do though, I often watch (and cringe as) my parents do it.