Communitygithub.com

Apple HIG: 選択と入力コントロール

ピッカー、トグル、スライダー、ステッパー、セグメントコントロール、コンボボックス、テキストフィールド、テキストビュー、ラベル、トークンフィールド、仮想キーボード、評価インジケーター、ゲージなど、Apple HIGに基づく選択・入力コントロールのガイダンスを提供します。

Apple HIG: 選択と入力コントロール とは?

このスキルは、Apple HIG(ヒューマンインターフェースガイドライン)に準拠した選択・入力コントロールの設計を支援します。ピッカー、トグル、スライダー、ステッパー、セグメントコントロール、コンボボックス、テキストフィールド/テキストビュー、ラベル、トークンフィールド、仮想キーボード、評価インジケーター、ゲージなど、iOS/macOSアプリで使われる様々なコントロールの適切な選択と実装方法を解説します。各コントロールの利用シナリオ、状態管理(即時反映 vs 確認後反映)、バリデーション、アクセシビリティについてのベストプラクティスを提供するため、開発者はこのスキルを使って、ユーザーが「ピッカーまたはセグメントコントロール」「フォームのデザイン」「適切なキーボードタイプ」「トグルとチェックボックスの違い」などと質問した際に、HIGに沿った的確な回答を行えます。クロスリファレンスとして、メニュー、ダイアログ、検索コンポーネントとも連携しています。

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

お気に入りのAIに質問する

このエージェントスキルを事前に読み込んだ状態で新しいチャットを開きます。

ドキュメント

Apple HIG: 選択と入力コントロール は何をしますか?

質問の前に .claude/apple-design-context.md を確認してください。既存のコンテキストを活用し、まだカバーされていない情報のみを尋ねてください。

主要な原則

  1. 現在の状態を明確に表示する。 ユーザーは常に何が選択されているかを認識できなければなりません。トグルはオン/オフを表示し、セグメントコントロールはアクティブなセグメントを強調表示し、ピッカーは現在の選択を表示します。

  2. 標準のシステムコントロールを優先する。 組み込みコントロールは一貫性とアクセシビリティを提供します。カスタムコントロールは学習曲線を生み、補助機能を損なう可能性があります。

  3. 二値状態にはトグルを使用する。 オンまたはオフ。設定画面のような画面では、変更は即座に反映されます。モーダルフォームでは、確認後に変更が確定します。

  4. 相互排他的なオプションにはセグメントコントロールを使用する。 2~5項目、ほぼ同等の重要度、短いラベル。

  5. 連続値にはスライダーを使用する。 正確な数値入力が重要でない場合に適しています。範囲の端点に最小/最大ラベルまたはアイコンを提供してください。

  6. 長いオプションリストにはピッカーを使用する。 セグメントコントロールでは扱いきれない数のオプションに適しています。日付、時刻、構造化データに適しています。

  7. 小さな精密な調整にはステッパーを使用する。 固定ステップで増減します。ステッパーの横に現在の値を表示し、適切な最小/最大の範囲を設定してください。

  8. 短い1行入力にはテキストフィールドを、複数行入力にはテキストビューを使用する。 キーボードタイプを期待する入力(メール、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 — コントロールスタイリングのためのタイポグラフィ、カラー、レイアウト

Built by Raintree Technology · More developer tools

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.

関連スキル