hig-components-menus
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseApple HIG: Menus and Buttons
Apple HIG: 菜单与按钮
Check for before asking questions. Use existing context and only ask for information not already covered.
.claude/apple-design-context.md在提问前请先查看文件。请基于已有上下文进行提问,仅询问未涵盖的信息。
.claude/apple-design-context.mdKey Principles
核心原则
-
Menus should be contextual and predictable. Standard items in standard locations. Follow platform conventions for ordering and grouping.
-
Use standard button styles. System-defined styles communicate affordance and maintain visual consistency. Prefer them over custom designs.
-
Toolbars for frequent actions. Most commonly used commands in the toolbar. Rarely used actions belong in menus.
-
Menu bar is the primary command interface on macOS. Every command reachable from the menu bar. Toolbars and context menus supplement, not replace.
-
Context menus for secondary actions. Right-click or long-press, relevant to the item under the pointer. Never put a command only in a context menu.
-
Pop-up buttons for mutually exclusive choices. Select exactly one option from a set.
-
Pull-down buttons for action lists. No current selection; they offer a set of commands.
-
Action buttons consolidate related actions behind a single icon in toolbars or title bars.
-
Disclosure controls for progressive disclosure. Show or hide additional content.
-
Dock menus: short and focused on the most useful actions when the app is running.
-
菜单应具备上下文关联性且可预测。标准菜单项需放在标准位置。遵循平台约定进行排序和分组。
-
使用标准按钮样式。系统定义的样式可传达交互提示并保持视觉一致性。优先使用标准样式而非自定义设计。
-
工具栏用于放置常用操作。将最常用的命令放在工具栏中。不常用的操作应放在菜单内。
-
菜单栏是macOS上的主要命令界面。所有命令都可通过菜单栏访问。工具栏和上下文菜单是补充,而非替代。
-
上下文菜单用于次要操作。通过右键点击或长按触发,仅包含与指针下项目相关的操作。切勿将某个命令仅放在上下文菜单中。
-
弹出按钮用于互斥选项选择。从一组选项中选择恰好一个选项。
-
下拉按钮用于操作列表。无当前选中项,提供一组命令选项。
-
操作按钮将相关操作整合在工具栏或标题栏的单个图标后。
-
展开控件用于渐进式展示内容。显示或隐藏额外内容。
-
程序坞菜单:简洁聚焦,仅包含应用运行时最实用的操作。
Reference Index
参考索引
| Reference | Topic | Key content |
|---|---|---|
| menus.md | General menu design | Item ordering, grouping, shortcuts |
| context-menus.md | Context menus | Right-click, long press, secondary actions |
| dock-menus.md | Dock menus | macOS app-level actions, running state |
| edit-menus.md | Edit menus | Undo, copy, paste, standard items |
| the-menu-bar.md | Menu bar | macOS primary command interface, structure |
| toolbars.md | Toolbars | Frequent actions, customization, placement |
| buttons.md | Buttons | System styles, sizing, affordance |
| action-button.md | Action button | Grouped secondary actions, toolbar use |
| pop-up-buttons.md | Pop-up buttons | Mutually exclusive choice selection |
| pull-down-buttons.md | Pull-down buttons | Action lists, no current selection |
| disclosure-controls.md | Disclosure controls | Progressive disclosure, show/hide |
| 参考文档 | 主题 | 核心内容 |
|---|---|---|
| menus.md | 通用菜单设计 | 菜单项排序、分组、快捷键 |
| context-menus.md | 上下文菜单 | 右键点击、长按、次要操作 |
| dock-menus.md | 程序坞菜单 | macOS应用级操作、运行状态 |
| edit-menus.md | 编辑菜单 | 撤销、复制、粘贴、标准菜单项 |
| the-menu-bar.md | 菜单栏 | macOS主要命令界面、结构 |
| toolbars.md | 工具栏 | 常用操作、自定义、布局 |
| buttons.md | 按钮 | 系统样式、尺寸、交互提示 |
| action-button.md | 操作按钮 | 分组次要操作、工具栏应用 |
| pop-up-buttons.md | 弹出按钮 | 互斥选项选择 |
| pull-down-buttons.md | 下拉按钮 | 操作列表、无当前选中项 |
| disclosure-controls.md | 展开控件 | 渐进式展示、显示/隐藏 |
Output Format
输出格式
- Component recommendation -- which menu or button type and why.
- Visual hierarchy -- placement, sizing, grouping within the interface.
- Platform-specific behavior across iOS, iPadOS, macOS, visionOS.
- Keyboard shortcuts (macOS) -- standard and custom shortcuts for menu items and toolbar actions.
- 组件推荐——应使用哪种菜单或按钮类型及原因。
- 视觉层级——在界面中的布局、尺寸、分组方式。
- 平台特定行为——涵盖iOS、iPadOS、macOS、visionOS。
- 键盘快捷键(macOS)——菜单项和工具栏操作的标准及自定义快捷键。
Questions to Ask
需询问的问题
- Which platforms?
- Primary or secondary action?
- How many actions need to be available?
- macOS menu bar app?
- 面向哪些平台?
- 是主要操作还是次要操作?
- 需要提供多少个操作选项?
- 是macOS菜单栏应用吗?
Related Skills
相关技能
- hig-components-search -- Search fields, page controls alongside toolbars and menus
- hig-components-controls -- Toggles, pickers, segmented controls complementing buttons
- hig-components-dialogs -- Alerts, sheets, popovers triggered by menu items or buttons
- hig-inputs -- Keyboard shortcuts and pointer interactions with menus and toolbars
Built by Raintree Technology · More developer tools
- hig-components-search——与工具栏和菜单搭配使用的搜索栏、页面控件
- hig-components-controls——与按钮互补的开关、选择器、分段控件
- hig-components-dialogs——由菜单项或按钮触发的提醒、表单、弹出框
- hig-inputs——菜单和工具栏的键盘快捷键与指针交互