Communitygithub.com

COTA-App/LandingPage

Apple HIG 選擇與輸入控制項指南,涵蓋挑選器、切換、滑桿、步進器、分段控制、組合框、文字欄位、文字檢視、標籤、令牌欄位、虛擬鍵盤、評分指示器和量表。

LandingPage 是什麼?

此技術技能提供 Apple 人機介面指南 (HIG) 中關於選擇與輸入控制項的完整參考,包括切換開關、分段控制、滑桿、步進器、挑選器、文字欄位、文字檢視、標籤、令牌欄位、組合框、虛擬鍵盤、評分指示器和量表。在設計表單、設定畫面或使用者輸入流程時,開發者可使用此技能獲得符合 Apple 設計規範的建議。技能支援 iOS、iPadOS 和 macOS 平台,但組合框和令牌欄位僅限 macOS。它提供控制項推薦(含理由)、狀態管理、驗證方式和無障礙支援的指引。技能會引導使用者先檢查 `.claude/apple-design-context.md` 檔案以利用現有上下文,再提出問題,並提供一份整合其他相關 HIG 技能(如 hig-components-menus、hig-components-dialogs 和 hig-components-search)的參考索引。

相容平台✓Claude Code~Codex CLI~Cursor
npx skills add https://github.com/COTA-App/LandingPage/tree/HEAD/.claude/skills/hig-components-controls

在你喜歡的 AI 中提問

開啟一個已預先載入此 Agent Skill 的新對話。

說明文件

Apple HIG:選擇與輸入控制項

在提問前,請檢查 .claude/apple-design-context.md。使用現有上下文,僅詢問尚未涵蓋的資訊。

主要原則

  1. 清晰的當前狀態。 使用者必須隨時看到已選取的項目。切換開關顯示開啟/關閉,分段控制突顯活動區段,挑選器顯示當前選取。

  2. 偏好使用標準系統控制項。 內建控制項提供一致性和無障礙性。自訂控制項會帶來學習曲線,並可能破壞輔助功能。

  3. 切換開關用於二元狀態。 開啟或關閉。在設定風格的畫面中,變更會立即生效。在模態表單中,變更會在確認時提交。

  4. 分段控制用於互斥選項。 2-5 個項目,重要性大致相等,使用簡短標籤。

  5. 滑桿用於連續數值。 當精確數字輸入不是關鍵時。為範圍端點提供最小值/最大值標籤或圖示。

  6. 挑選器用於長選項列表。 選項太多不適合分段控制。非常適合日期、時間、結構化資料。

  7. 步進器用於小而精確的調整。 以固定步長增加/減少。在步進器旁顯示當前數值,並設定合理的最大/最小界限。

  8. 文字欄位用於短單行輸入。 文字檢視用於多行。設定鍵盤類型以符合預期輸入(電子郵件、URL、數字)。

  9. 組合框:文字輸入 + 選取列表。 僅限 macOS。當自訂值有效時,可以輸入值或從預定義列表中選擇。

  10. 令牌欄位:離散值作為視覺令牌。 僅限 macOS。用於電子郵件收件人、標籤或離散項目的集合。

  11. 量表和評分指示器顯示數值。 量表顯示範圍內的數值。評分指示器顯示評分(通常是星星)。僅供顯示;使用互動變體進行輸入。

參考索引

參考資料主題主要內容
controls.md一般控制項狀態、啟發性、系統控制項
toggles.md切換開關開啟/關閉、即時生效
segmented-controls.md分段控制2-5 個選項、權重相等
sliders.md滑桿連續範圍、最小/最大值標籤
steppers.md步進器固定步長、有界數值
pickers.md挑選器日期、時間、長選項集
combo-boxes.md組合框僅限 macOS、輸入或選擇、自訂值
text-fields.md文字欄位短輸入、鍵盤類型、驗證
text-views.md文字檢視多行、評論、描述
labels.md標籤放置、VoiceOver 支援
token-fields.md令牌欄位僅限 macOS、晶片、標籤、收件人
virtual-keyboards.md虛擬鍵盤電子郵件、URL、數字鍵盤類型
rating-indicators.md評分指示器星級評分、僅供顯示
gauges.md量表等級指示器、範圍顯示

輸出格式

  1. 控制項建議與理由,以及為何替代方案較不適合。
  2. 狀態管理——控制項如何溝通當前狀態,以及變更是立即套用還是在確認時套用。
  3. 驗證方式——何時顯示錯誤以及如何溝通規則。
  4. 無障礙性——為 VoiceOver 提供的標籤、屬性、提示。

要問的問題

  1. 資料類型是什麼?(布林值、從固定集合中選擇、數值、自由格式文字?)
  2. 有多少選項?
  3. 哪些平台?(組合框和令牌欄位僅限 macOS)
  4. 設定畫面還是內聯表單?

相關技能

  • hig-components-menus——按鈕和彈出式按鈕,可補充選取控制項
  • hig-components-dialogs——包含表單的工作表和浮出層
  • hig-components-search——共享文字輸入模式之搜尋欄位
  • hig-inputs——與控制項互動的鍵盤、指標、手勢
  • hig-foundations——適用於控制項樣式的字體、顏色、佈局

由 Raintree Technology 建置 · 更多開發者工具

Individual skills in this repo

This repo contains 4 individual skills — each has its own dedicated page.

COTA-App/LandingPage

>- Apple Human Interface Guidelines for content display components. Use this skill when the user asks about "charts component", "collection view", "image view", "web view", "color well", "image well", "activity view", "lockup", "data visualization", "content display", displaying images, rendering web content, color pickers, or presenting collections of items in Apple apps. Also use when the user says "how should I display charts", "what's the best way to show images", "should I use a web view", "how do I build a grid of items", "what component shows media", or "how do I present a share sheet". Cross-references: hig-foundations for color/typography/accessibility, hig-patterns for data visualization patterns, hig-components-layout for structural containers, hig-platforms for platform-specific component behavior.

COTA-App/LandingPage

>- Apple Human Interface Guidelines for layout and navigation components. Use this skill when the user asks about "sidebar", "split view", "tab bar", "tab view", "scroll view", "window design", "panel", "list view", "table view", "column view", "outline view", "navigation structure", "app layout", "boxes", "ornaments", or organizing content hierarchically in Apple apps. Also use when the user says "how should I organize my app", "what navigation pattern should I use", "my layout breaks on iPad", "how do I build a sidebar", "should I use tabs or a sidebar", or "my app doesn't adapt to different screen sizes". Cross-references: hig-foundations for layout/spacing principles, hig-platforms for platform-specific navigation, hig-patterns for multitasking and full-screen, hig-components-content for content display.

COTA-App/LandingPage

>- Apple Human Interface Guidelines design foundations. Use this skill when the user asks about "HIG color", "Apple typography", "SF Symbols", "dark mode guidelines", "accessible design", "Apple design foundations", "app icon", "layout guidelines", "materials", "motion", "privacy", "right to left", "RTL", "inclusive design", branding, images, spatial layout, or writing style. Also use when the user says "my colors look wrong in dark mode", "what font should I use", "is my app accessible enough", "how do I support Dynamic Type", "what contrast ratio do I need", "how do I pick system colors", or "my icons don't match the system style". Cross-references: hig-platforms for platform-specific guidance, hig-patterns for interaction patterns, hig-components-layout for structural components, hig-components-content for display.

COTA-App/LandingPage

>- Apple Human Interface Guidelines interaction and UX patterns. Use this skill when the user asks about "onboarding flow", "user onboarding", "app launch", "loading state", "drag and drop", "search pattern", "settings design", "notifications", "modality", "multitasking", "feedback pattern", "haptics", "undo redo", "file management", data entry, sharing, collaboration, full screen, audio, video, haptic feedback, ratings, printing, help, or account management in Apple apps. Also use when the user says "how should onboarding work", "my app takes too long to load", "should I use a modal here", "how do I handle errors", "when should I ask for permissions", "how to show progress", or "what's the right way to confirm a delete". Cross-references: hig-foundations for underlying principles, hig-platforms for platform specifics, hig-components-layout for navigation, hig-components-content for data display.

相關技能