hig-components-controls
它能做什么
这个工具可以帮你为应用选择合适的选择和输入控件,比如按钮、文本框和选择器。它会确保控件能清楚地显示选中状态,并在可能的情况下建议使用系统默认控件。
适用场景
- ✓设计设置表单时。
- ✓创建数据录入界面时。
- ✓决定用户如何在应用中选择选项时。
技能链接
https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/hig-components-controls/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“我需要在设置页面中放一个控件,让用户在“是”和“否”之间做选择。”
每周 5 个新技能,1 分钟读完。
工作原理
AI 会分析你想收集的信息类型(文本、数字、选项)以及选项的数量,然后推荐最合适的控件。比如“是/否”可以用开关,长列表则可以用选择器。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Apple HIG: Selection and Input Controls
Check for .claude/apple-design-context.md before asking questions. Use existing context and only ask for information not already covered.
Key Principles
Clear current state. Users must always see what is selected. Toggles show on/off, segmented controls highlight the active segment, pickers display the current selection.
Prefer standard system controls. Built-in controls provide consistency and accessibility. Custom controls introduce a learning curve and may break assistive features.
Toggles for binary states. On or off. In Settings-style screens, changes take effect immediately. In modal forms, changes commit on confirmation.
Segmented controls for mutually exclusive options. 2-5 items, roughly equal importance, short labels.
Sliders for continuous values. When precise numeric input is not critical. Provide min/max labels or icons for range endpoints.
Pickers for long option lists. Too many options for a segmented control. Works well for dates, times, structured data.
Steppers for small, precise adjustments. Increment/decrement in fixed steps. Display current value next to the stepper with reasonable min/max bounds.
Text fields for short, single-line input. Text views for multi-line. Configure keyboard type to match expected input (email, URL, number).
Combo boxes: text input + selection list. macOS. Type a value or choose from a predefined list when custom values are valid.
Token fields: discrete values as visual tokens. macOS. For email recipients, tags, or collections of discrete items.
Gauges and rating indicators display values. Gauges show a value within a range. Rating indicators show ratings (often stars). Display-only; use interactive variants for input.
Reference Index
| Reference | Topic | Key content |
|---|---|---|
| controls.md | General controls | States, affordance, system controls |
| toggles.md | Toggles | On/off, immediate effect |
| segmented-controls.md | Segmented controls | 2-5 options, equal weight |
| sliders.md | Sliders | Continuous range, min/max labels |
| steppers.md | Steppers | Fixed steps, bounded values |
| pickers.md | Pickers | Dates, times, long option sets |
| combo-boxes.md | Combo boxes | macOS, type or select, custom values |
| text-fields.md | Text fields | Short input, keyboard types, validation |
| text-views.md | Text views | Multi-line, comments, descriptions |
| labels.md | Labels | Placement, VoiceOver support |
| token-fields.md | Token fields | macOS, chips, tags, recipients |
| virtual-keyboards.md | Virtual keyboards | Email, URL, number keyboard types |
| rating-indicators.md | Rating indicators | Star ratings, display-only |
| gauges.md | Gauges | Level indicators, range display |
Output Format
- Control recommendation with rationale and why alternatives are less suitable.
- State management -- how the control communicates current state and whether changes apply immediately or on confirmation.
- Validation approach -- when to show errors and how to communicate rules.
- Accessibility -- labels, traits, hints for VoiceOver.
Questions to Ask
- What type of data? (Boolean, choice from fixed set, numeric, free-form text?)
- How many options?
- Which platforms? (Combo boxes and token fields are macOS-only)
- Settings screen or inline form?
Related Skills
- hig-components-menus -- Buttons and pop-up buttons complementing selection controls
- hig-components-dialogs -- Sheets and popovers containing forms
- hig-components-search -- Search fields sharing text input patterns
- hig-inputs -- Keyboard, pointer, gesture interactions with controls
- hig-foundations -- Typography, color, layout for control styling
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:
…
常见问题
什么是“选择和输入控件”?
这些是用户在应用中用来提供信息或做出选择的元素,比如按钮、文本框、下拉菜单等。
为什么要使用标准系统控件?
用户对它们比较熟悉,能很好地配合无障碍功能(比如屏幕阅读器),并确保不同应用之间的体验保持一致。
什么时候应该使用滑块?
当用户需要在连续范围内选择一个数值,而且不需要精确到具体数字时使用,比如调节音量或亮度。
详情
作者的原始描述
Check for .claude/apple-design-context.md before asking questions. Use existing context and only ask for information not already covered.
热度
- GitHub 星标
- 48k
- 排名
- #4811
- 许可证
- MIT
- 更新时间
- 2026/10/15
评论
- …
同一仓库的更多技能
00-andruia-consultant
48k帮你的智能体启动或改进 AI 项目。它可以分析代码、推荐工具,并用西班牙语制定行动计划。
007
48k让你的智能体执行安全审计和威胁建模。它有助于保护项目免受攻击和漏洞的威胁。
10-andruia-skill-smith
48k帮你的智能体创建或改进 AI 工具。它可以定义工具的工作方式、编写文档,并验证其结构。
20-andruia-niche-intelligence
48k让你的智能体创建某个特定行业的摘要。它有助于借助可靠的信息来源,了解项目的背景、规则、使用模式和风险。