Wednesday, October 12, 2016

UI/UX Khi nào dùng switch , khi nào dùng checkbox

Thật khó để nhận ra khi nào dùng " salad fork" khi nào dùng "dinner fork" khi mà chỉ nhìn chúng . Bởi vì chúng có cấu tạo , chức năng tương tự nhau. Cả 2 đều có những cái xỉa giống nhau để tách/xé thức ăn , nhưng lí do chúng được thiết kế là  dể đanh cho những loại thức ăn khác nhau. 
forks

Cùng chức năng nhưng trong những Context khác nhau

Forks confuse people in the same way that switches and checkboxes confuse designers. Many designers think it doesn’t matter when you use one or the other. But the arbitrary use of them can cause unexpectedness and confusion. Like forks, these user interface controls are meant for different contexts.
Switches and checkboxes are both used to activate settings. But the immediacy of when users expect those settings to activate are different.
Using these controls in the right context will make your user interface intuitive to use. But using them in the wrong context can cause users to wonder what went wrong.

Switches Are for Instantaneous Actions

Switches always indicate whether a setting is on or off. When users turn a switch to “on”, they expect an instantaneous action as soon as the label appears. This is what “on” implies, not just for UI switches but real-world switches too.
When you flip a light switch on you expect the bulb to light up in an instant. Any delayed effect or need for further action makes you think something is wrong.
switch-checkbox-with-button

Switches should never require users to press a button to apply their settings. This is because a switch is already a toggle button. When you require users to press a submit button, you confuse them because it’s not what they expect.
You should only use switches on settings that need to take effect instantaneously. If a setting requires a button press before it can take effect, you should use a checkbox instead.

Checkboxes Require a Button Press

A checkbox does not apply a setting at an instant like a switch. Instead, it’s accompanied by a submit button and takes effect after the user presses it. Requiring a button press allows users to review their settings before they commit. This helps prevent accidental activation errors.
switches-vs-checkboxes
The visual cue of a checkbox is different than a switch. While “on” implies instance, a checkmark only implies selection. This means users expect a more immediate change with switches than checkboxes.
Checkboxes are useful for applying a batch of settings. With switches, users have to wait for the system to apply a setting one by one. Checkboxes allow the system to handle multiple setting changes at one time.
If the user will change a batch of settings often, checkboxes save more time. But if the user will change only a few settings often, switches work better.

Deciding Between Switch or Checkbox

When deciding between a switch or checkbox, focus on context, not function. Ask yourself whether a setting should take immediate effect or not. Ask yourself whether users need to check their settings before they apply them.
There are many real-world objects that have similar functions. But similarity doesn’t mean they’re a fit for any occasion. There are subtle differences that come into play for a specific context. These differences are details that designers should never ignore.

Buy me a coffee