Communitygithub.com

COTA-App/LandingPage 內容顯示元件指南

根據 Apple 人機介面指南,提供 iOS、macOS、tvOS 與 visionOS 上內容顯示元件的設計建議與實作指引。

LandingPage 內容顯示元件指南 是什麼?

此技能協助開發者以蘋果官方人機介面指南 (HIG) 為基礎,選擇與實作最佳的內容顯示元件。涵蓋圖表、集合視圖、圖片檢視、網頁瀏覽、色彩挑選器、媒體夾、活動視圖與鎖定畫面等元件。技能內含元件選擇對照表、關鍵設計原則(如適應性佈局、無障礙支援、視覺階層與平台慣例)、以及參考標記檔案清單。支援平台包含 iOS、macOS、watchOS、tvOS 與 visionOS,並強調使用系統內建元件(如 UICollectionView、Swift Charts、WKWebView)以確保無障礙與平台一致性。對於大型資料集,也提供延遲載入、儲存格重用與預先擷取等效能最佳化建議。最後,輸出格式包含元件推薦與理由、組態設定指引、無障礙需求及平台專屬注意事項。

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

在你喜歡的 AI 中提問

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

說明文件

Apple HIG:內容元件

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

關鍵原則

  1. 適應不同尺寸與上下文。 內容元件必須能在各種螢幕尺寸、方向和多重任務配置下正常運作。請使用 Auto Layout 與 Size Classes。

  2. 確保內容無障礙。 圖表需要音訊圖形支援。圖片需要替代文字。集合需要正確的 VoiceOver 導覽順序。所有內容元件都需要標籤與描述。

  3. 維持視覺層級。 利用間距、尺寸與分組建立清晰的資訊層級。主要內容應在視覺上顯著。

  4. 優先使用系統元件。 在建立自訂元件前,請優先評估 UICollectionView、SwiftUI Charts、WKWebView。系統元件內建無障礙支援與平台適應能力。

  5. 尊重平台慣例。 在 tvOS 上,集合使用大型鎖定畫面(Lockups)搭配視差效果。在 iOS 上,同一集合使用緊湊的儲存格與觸控目標。在 visionOS 上,內容會增加深度與懸停效果。

  6. 處理空狀態。 顯示有意義的空狀態,並提供如何填入內容的引導,而不是呈現空白的畫面。

  7. 針對效能最佳化。 對於大型資料集,請使用延遲載入、儲存格重用、分頁與預先提取。

參考索引

參考檔案主題關鍵內容
charts.md圖表Swift Charts、長條/折線/區域/點標記、圖表無障礙、音訊圖形
collections.md集合格線/列表佈局、組合式佈局、選取、重新排序、可差異資料來源
image-views.md圖片檢視長寬比處理、內容模式、SF Symbol 圖片、無障礙
image-wells.md媒體夾拖放圖片選取、macOS 專用、預留位置內容
color-wells.md色彩挑選器色彩選取 UI、系統色彩挑選器、自訂色彩空間
web-views.md網頁檢視WKWebView、SFSafariViewController、導覽控制、內容限制
activity-views.md活動檢視分享表單、活動項目、自訂活動、動作擴充功能
lockups.md鎖定畫面圖片+文字元素、tvOS 卡片佈局、焦點效果、層架佈局

元件選擇指南

內容需求建議元件平台備註
視覺化定量資料圖表(Swift Charts)iOS 16+、macOS 13+、watchOS 9+
瀏覽格線或列表項目集合檢視使用組合式佈局處理複雜排列
顯示單張圖片圖片檢視支援長寬比調整;提供無障礙描述
透過拖放或瀏覽選取圖片媒體夾主要用於 macOS;在 iOS 上使用圖片挑選器
選取色彩色彩挑選器觸發系統色彩挑選器;macOS、iOS 14+
內嵌顯示網頁內容網頁檢視(WKWebView)外部瀏覽請使用 SFSafariViewController
分享內容至其他 App活動檢視系統分享表單,可設定活動類型
內容卡片(圖片+文字)鎖定畫面主要用於 tvOS;可適應其他平台

輸出格式

  1. 元件推薦與理由,參照相關的 HIG 參考檔案。
  2. 組態設定指引 — 關鍵屬性與設定方式。
  3. 推薦元件的無障礙需求。
  4. 針對目標平台的平台專屬注意事項。

應詢問的問題

  1. 內容類型為何?(定量資料、圖片、網頁內容、可瀏覽集合、分享動作?)
  2. 目標平台為何?
  3. 內容為靜態或動態?
  4. 內容數量為何?(少數項目 vs 數百/數千項會影響元件選擇與最佳化。)

相關技能

  • hig-foundations — 色彩、字體、無障礙與圖片指南
  • hig-patterns — 資料視覺化、分享與載入模式
  • hig-components-layout — 承載內容的結構容器(捲動檢視、列表、分割檢視)
  • hig-platforms — 平台專屬元件行為(tvOS 上的鎖定畫面、macOS 上的網頁檢視)

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

Individual skills in this repo

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

COTA-App/LandingPage

>- Apple HIG guidance for selection and input controls including pickers, toggles, sliders, steppers, segmented controls, combo boxes, text fields, text views, labels, token fields, virtual keyboards, rating indicators, and gauges. Use this skill when the user says "picker or segmented control," "how should my form look," "what keyboard type should I use," "toggle vs checkbox," or asks about picker design, toggle, switch, slider, stepper, text field, text input, segmented control, combo box, label, token field, virtual keyboard, rating indicator, gauge, form design, input validation, or control state management. Cross-references: hig-components-menus, hig-components-dialogs, hig-components-search.

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.

相關技能