Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

One thing that you lose if you replace checkboxes with toggle switches, at least on webpages, is the third 'indeterminate' state that JavaScript offers. https://css-tricks.com/indeterminate-checkboxes/


I've never understood what that state is supposed to indicate. It only makes sense when the checkbox has nested checkboxes underneath and an indeterminate state only indicates that the user has some of the children selected. But as a user I'd never be able to select this indeterminate state, since, by definition, it is indeterminate. for such scenarios, I'm not sure what is good design.


Food ordering screen:

[ ] Add sauces to my food

  [ ] Mayonnaise

  [ ] Ketchup

  [ ] XO Sauce
If I want all sauces I click the first box:

[v] Add sauces to my food

  [v] Mayonnaise

  [v] Ketchup

  [v] XO Sauce
If I only want Ketchup and click that:

[-] Add sauces to my food

  [ ] Mayonnaise

  [v] Ketchup

  [ ] XO Sauce


Better ordering screen:

    Extra sauces (1 selected):
      [ ] Mayonnaise
      [v] Ketchup
      [ ] XO Sauce
I understand what indeterminate checkboxes are, but I don't remember them ever actually making sense anywhere I found them.


When well implemented the clicking [-] would unselect all and clicking again select all.

It does not matter with 3 options and 1 selected, but its nice if its 20 options and 7 random ones selected.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: