hig-components-menus

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Apple HIG: Menus and Buttons

Apple HIG: 菜单与按钮

Check for
.claude/apple-design-context.md
before asking questions. Use existing context and only ask for information not already covered.
在提问前请先查看
.claude/apple-design-context.md
文件。请基于已有上下文进行提问,仅询问未涵盖的信息。

Key Principles

核心原则

  1. Menus should be contextual and predictable. Standard items in standard locations. Follow platform conventions for ordering and grouping.
  2. Use standard button styles. System-defined styles communicate affordance and maintain visual consistency. Prefer them over custom designs.
  3. Toolbars for frequent actions. Most commonly used commands in the toolbar. Rarely used actions belong in menus.
  4. Menu bar is the primary command interface on macOS. Every command reachable from the menu bar. Toolbars and context menus supplement, not replace.
  5. 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.
  6. Pop-up buttons for mutually exclusive choices. Select exactly one option from a set.
  7. Pull-down buttons for action lists. No current selection; they offer a set of commands.
  8. Action buttons consolidate related actions behind a single icon in toolbars or title bars.
  9. Disclosure controls for progressive disclosure. Show or hide additional content.
  10. Dock menus: short and focused on the most useful actions when the app is running.
  1. 菜单应具备上下文关联性且可预测。标准菜单项需放在标准位置。遵循平台约定进行排序和分组。
  2. 使用标准按钮样式。系统定义的样式可传达交互提示并保持视觉一致性。优先使用标准样式而非自定义设计。
  3. 工具栏用于放置常用操作。将最常用的命令放在工具栏中。不常用的操作应放在菜单内。
  4. 菜单栏是macOS上的主要命令界面。所有命令都可通过菜单栏访问。工具栏和上下文菜单是补充,而非替代。
  5. 上下文菜单用于次要操作。通过右键点击或长按触发,仅包含与指针下项目相关的操作。切勿将某个命令仅放在上下文菜单中。
  6. 弹出按钮用于互斥选项选择。从一组选项中选择恰好一个选项。
  7. 下拉按钮用于操作列表。无当前选中项,提供一组命令选项。
  8. 操作按钮将相关操作整合在工具栏或标题栏的单个图标后。
  9. 展开控件用于渐进式展示内容。显示或隐藏额外内容。
  10. 程序坞菜单:简洁聚焦,仅包含应用运行时最实用的操作。

Reference Index

参考索引

ReferenceTopicKey content
menus.mdGeneral menu designItem ordering, grouping, shortcuts
context-menus.mdContext menusRight-click, long press, secondary actions
dock-menus.mdDock menusmacOS app-level actions, running state
edit-menus.mdEdit menusUndo, copy, paste, standard items
the-menu-bar.mdMenu barmacOS primary command interface, structure
toolbars.mdToolbarsFrequent actions, customization, placement
buttons.mdButtonsSystem styles, sizing, affordance
action-button.mdAction buttonGrouped secondary actions, toolbar use
pop-up-buttons.mdPop-up buttonsMutually exclusive choice selection
pull-down-buttons.mdPull-down buttonsAction lists, no current selection
disclosure-controls.mdDisclosure controlsProgressive 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

输出格式

  1. Component recommendation -- which menu or button type and why.
  2. Visual hierarchy -- placement, sizing, grouping within the interface.
  3. Platform-specific behavior across iOS, iPadOS, macOS, visionOS.
  4. Keyboard shortcuts (macOS) -- standard and custom shortcuts for menu items and toolbar actions.
  1. 组件推荐——应使用哪种菜单或按钮类型及原因。
  2. 视觉层级——在界面中的布局、尺寸、分组方式。
  3. 平台特定行为——涵盖iOS、iPadOS、macOS、visionOS。
  4. 键盘快捷键(macOS)——菜单项和工具栏操作的标准及自定义快捷键。

Questions to Ask

需询问的问题

  1. Which platforms?
  2. Primary or secondary action?
  3. How many actions need to be available?
  4. macOS menu bar app?
  1. 面向哪些平台?
  2. 是主要操作还是次要操作?
  3. 需要提供多少个操作选项?
  4. 是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

  • hig-components-search——与工具栏和菜单搭配使用的搜索栏、页面控件
  • hig-components-controls——与按钮互补的开关、选择器、分段控件
  • hig-components-dialogs——由菜单项或按钮触发的提醒、表单、弹出框
  • hig-inputs——菜单和工具栏的键盘快捷键与指针交互