hig-components-dialogs
它能做什么
这个工具可以帮你按照 Apple 的规范,选择合适的“弹出框”类型(比如提示框或菜单),用来在应用中展示信息或请求用户操作。它还能确保这些弹出框在不同设备上都有最佳的显示效果。
适用场景
- ✓当你需要向用户展示重要错误信息时。
- ✓当你要创建一个让用户快速填写的表单时。
- ✓当你要提供操作选项供用户选择时。
技能链接
https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/hig-components-dialogs/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“删除文件之前,我需要显示一个确认提示,用哪种弹出框最合适?”
每周 5 个新技能,1 分钟读完。
工作原理
工具会分析你想展示或请求的内容,并依据 Apple 的设计指南,推荐最合适的视觉组件(提示框、菜单等)。它会考虑操作是否紧急、是否需要确认,还是只是一个可选项。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Apple HIG: Presentation Components
Check for .claude/apple-design-context.md before asking questions. Use existing context and only ask for information not already covered.
Key Principles
Alerts: sparingly, for critical situations. Errors needing attention, destructive action confirmations, or information requiring acknowledgment. They interrupt flow and demand a response.
Sheets: focused tasks that maintain context. Slides in from the edge (or attaches to a window on macOS). Use for creating items, editing settings, multi-step forms.
Popovers: non-modal on iPad and Mac. Appear next to the trigger element, dismissed by tapping outside. For additional information, options, or controls without taking over the screen.
Action sheets: choosing among actions. Present when picking from multiple actions, especially if one is destructive. iPhone: slide up from bottom. iPad: appear as popovers.
Minimize interruptions. Before reaching for a modal, consider inline presentation or making the action undoable instead.
Concise, actionable alert text. Short descriptive title. Brief message body if needed. Button labels should be specific verbs ("Delete", "Save"), not "OK".
Mark destructive actions clearly. Destructive button style (red text). Place destructive buttons where users are less likely to tap reflexively.
Provide a cancel option for alerts and action sheets with multiple actions. On action sheets, cancel appears at the bottom, separated.
Digit entry: focused and accessible. Appropriately sized input fields, automatic advancement between digits, support for paste and autofill.
Adapt presentation to platform. The same interaction may use different components on iPhone, iPad, Mac, and visionOS.
Reference Index
| Reference | Topic | Key content |
|---|---|---|
| alerts.md | Alerts | Button ordering, title/message text, confirmation, destructive actions |
| action-sheets.md | Action sheets | Multiple actions, cancel option, destructive handling |
| popovers.md | Popovers | Non-modal, dismiss on tap outside, iPad/Mac |
| sheets.md | Sheets | Modal task, context preservation |
| digit-entry-views.md | Digit entry | PIN input, autofill, auto-advance |
Output Format
- Recommended presentation type with rationale and why alternatives are less suitable.
- Content guidelines -- title, message, button labels per Apple's tone and brevity rules.
- Dismiss behavior -- how the user dismisses and what happens (save, discard, cancel).
- Alternatives -- when the scenario might not need a modal at all (inline feedback, undo, progressive disclosure).
Questions to Ask
- What information or action does the presentation need?
- Blocking or non-blocking?
- Which platforms?
- How often does this appear?
Related Skills
- hig-components-menus -- Buttons and toolbar items triggering presentations
- hig-components-controls -- Input controls within sheets and popovers
- hig-components-search -- Search and navigation within presented views
- hig-patterns -- Modality, interruptions, user flow management
- hig-foundations -- Color, typography, layout for presentation components
Built by Raintree Technology · More developer tools
When to Use
This skill is applicable to execute the workflow or actions described in the overview.
Example
User request:
Use @hig-components-dialogs for this task: Apple HIG guidance for presentation components including alerts, action sheets, popovers, sheets, and digit entry views.
Limitations
- Use this skill only when the task clearly matches the scope described above.
- Do not treat the output as a substitute for environment-specific validation, testing, or expert review.
- Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.
常见问题
什么是“展示组件”?
这些是出现在应用主内容上层、用来吸引用户注意的视觉元素,比如提示窗口、操作菜单,或从屏幕边缘滑出的表单。
为什么要遵守 Apple 的规范?
遵循 Apple 的指南(也就是 HIG)有助于打造让已经在使用其他 Apple 产品的人感到熟悉、易于上手的应用,从而保证良好的体验。
什么时候不需要使用这个工具?
如果你的需求并不是关于如何有条理地以视觉方式呈现信息或请求操作,或者你已经清楚知道该用哪种弹出框,就不需要使用它。
详情
作者的原始描述
Apple HIG guidance for presentation components including alerts, action sheets, popovers, sheets, and digit entry views.
热度
- GitHub 星标
- 48k
- 排名
- #4812
- 许可证
- MIT
- 更新时间
- 2026/10/15
评论
- …
同一仓库的更多技能
00-andruia-consultant
48k帮你的智能体启动或改进 AI 项目。它可以分析代码、推荐工具,并用西班牙语制定行动计划。
007
48k让你的智能体执行安全审计和威胁建模。它有助于保护项目免受攻击和漏洞的威胁。
10-andruia-skill-smith
48k帮你的智能体创建或改进 AI 工具。它可以定义工具的工作方式、编写文档,并验证其结构。
20-andruia-niche-intelligence
48k让你的智能体创建某个特定行业的摘要。它有助于借助可靠的信息来源,了解项目的背景、规则、使用模式和风险。