相关
[[单选 Radio]]
## 概念
复选框的标题最好是清晰明了的,如果不能一眼就理解,那可能就需要调整。
- [Checkboxes - Buttons - macOS - Apple](https://developer.apple.com/design/human-interface-guidelines/macos/buttons/checkboxes)
- A checkbox is a type of button that lets the user choose between two opposite states, actions, or values. A selected checkbox is considered _on_ when it contains a checkmark and _off_ when it's empty. A checkbox is almost always followed by a title unless it appears in a checklist.
- 复选框是一种按钮,它允许q用户在两个相反的状态、操作或值之间进行选择。选中的复选框在包含复选标记时被视为打开,在为空时被视为关闭。复选框几乎总是后面跟着一个标题,除非它出现在检查表中。
- **Provide a title that implies two opposite states.** Make sure it’s clear what happens when the checkbox is selected or deselected. In general, use sentence case without punctuation. If you can’t find an unambiguous title, consider using a pair of radio buttons instead, so you can clarify the states with two different labels. See [Radio Buttons](https://developer.apple.com/design/human-interface-guidelines/macos/buttons/radio-buttons).
-
## 状态与类型
- 未选中
- 选中
- 未选失效
- 已选失效
- 部分选中
![[Pasted image 20211118201501.png]]
## 最佳实践
### Do
- 一般来说,垂直排列多个复选框。垂直排列时,更容易区分它们的状态。 #AppleGuidelines 
- [Multiselect – Cloudscape Design System](https://cloudscape.design/components/multiselect/?tabId=usage)
- 如果可能的话,从列表中预先选择一个好的默认项。
- 按字母顺序排列项目,除非您需要根据优先级排列项目。
- 如果选项属于不同的类别,则使用组。如果有超过 16 个建议,也可以考虑使用组。
- 只有在绝对必要的情况下,才对每个选项使用额外的元数据。添加额外的信息可能会妨碍决策,如果不是必要的互动。
- 对任何空值使用“-”或者“--”(连字符)。
- 尽量避免混合使用组和非组选项
### Don't
- **Use a radio button when the user needs to choose between more than two states.** See [Radio Buttons](https://developer.apple.com/design/human-interface-guidelines/macos/buttons/radio-buttons). 当用户需要在两个以上状态之间进行选择时,使用单选按钮。 #AppleGuidelines
- **Use a checkbox in a view, not a window frame.** Checkboxes aren’t intended for use in window frame elements like toolbars and status bars. #AppleGuidelines