返回技能列表

hig-components-layout

raintree-technology
更新于 4 days ago
78
9
78
在 GitHub 上查看
design

关于

This skill provides Apple's Human Interface Guidelines for layout and navigation components like sidebars, tab bars, and split views. Use it when designing app structure, choosing navigation patterns, or solving adaptive layout issues across Apple platforms. It references related HIG skills for foundations, platforms, and content display.

快速安装

Claude Code

推荐
主要方式
npx skills add raintree-technology/claude-starter -a claude-code
插件命令备选方式
/plugin add https://github.com/raintree-technology/claude-starter
Git 克隆备选方式
git clone https://github.com/raintree-technology/claude-starter.git ~/.claude/skills/hig-components-layout

在 Claude Code 中复制并粘贴此命令以安装该技能

技能文档

Apple HIG: Layout and Navigation Components

Check for .claude/apple-design-context.md before asking questions. Use existing context and only ask for information not already covered.

Key Principles

  1. Organize hierarchically. Structure information from broad categories to specific details. Sidebars for top-level sections, lists for browsable items, detail views for individual content.

  2. Use standard navigation patterns. Tab bars for flat navigation between peer sections (iPhone). Sidebars for deep hierarchical navigation (iPad, Mac). Match the pattern to the information architecture and platform.

  3. Adapt to screen size. Three-column on iPad collapses to single-column on iPhone. Use size classes and adaptive APIs (NavigationSplitView) for automatic adaptation.

  4. Support multitasking on iPad. Respond gracefully to Split View, Slide Over, and Stage Manager. Test at every split ratio and size class transition.

  5. Maintain spatial consistency on visionOS. Windows, volumes, and ornaments in shared space. Position predictably. Use ornaments for toolbars and controls without occluding content.

  6. Use scroll views for overflow content. Enable paging for discrete content units. Support pull-to-refresh where appropriate. Respect safe areas.

  7. Keep navigation predictable. Users should always know where they are, how they got there, and how to go back. Use back buttons, breadcrumbs, and clear section titles.

  8. Prefer system components. UINavigationController, UISplitViewController, NavigationSplitView, and TabView provide built-in adaptivity, accessibility, and state restoration.

Reference Index

ReferenceTopicKey content
sidebars.mdSidebarsSource lists, selection state, collapsible sections, iPad/Mac patterns
column-views.mdColumn ViewsFinder-style browsing, progressive disclosure through columns
outline-views.mdOutline ViewsExpandable hierarchies, disclosure triangles, tree structures
split-views.mdSplit ViewsTwo/three column layouts, NavigationSplitView, adaptive collapse
tab-views.mdTab ViewsSegmented tabs, page-style tabs, macOS tab grouping
tab-bars.mdTab BarsBottom tab bars (iOS), badge counts, max tab count
scroll-views.mdScroll ViewsPaging, scroll indicators, content insets, pull-to-refresh
windows.mdWindowsmacOS/visionOS window management, sizing, full-screen, restoration
panels.mdPanelsInspector panels, utility panels, floating panels, macOS conventions
lists-and-tables.mdLists and TablesPlain/grouped/inset-grouped styles, swipe actions, section headers
boxes.mdBoxesContent grouping containers, labeled boxes, macOS grouping
ornaments.mdOrnamentsvisionOS toolbar attachments, positioning, visibility

Navigation Pattern Selection

App StructureRecommended PatternPlatform Adaptation
3-5 peer top-level sectionsTab BariPhone: bottom tab bar. iPad: sidebar (.sidebarAdaptable, iPadOS 18+). Mac: sidebar or toolbar tabs
Deep hierarchical contentSidebar + NavigationSplitViewiPhone: single column stack. iPad: two/three columns. Mac: full multi-column
Deep file/folder treeColumn ViewMac: Finder-style. iPad: adaptable. iPhone: push navigation
Flat list with detailSplit View (two column)iPhone: push/pop stack. iPad/Mac: primary + detail columns
Document-based with inspectorsWindow + PanelsMac: main window with inspector. iPad: sheet or popover
Spatial app with toolsWindow + OrnamentsvisionOS: ornaments on window. Other platforms: toolbars

Layout Adaptation Checklist

  • Compact width (iPhone portrait): Navigation collapses to single stack? Tab bars visible?
  • Regular width (iPad landscape, Mac): Navigation expands to sidebar + detail? Space used well?
  • Multitasking (iPad): Adapts at every split ratio? Works in Slide Over?
  • Accessibility: Supports Dynamic Type at all sizes? VoiceOver order logical?
  • Orientation: Content reflows between portrait and landscape?
  • visionOS: Windows positioned ergonomically? Ornaments accessible? Depth meaningful?

Output Format

  1. Recommended navigation pattern with rationale for the app's information architecture.
  2. Layout hierarchy from root container down (e.g., TabView > NavigationSplitView > List > Detail).
  3. Platform adaptation across targeted platforms and size classes.
  4. Size class behavior at each transition.

Questions to Ask

  1. What is the app's information architecture? (Sections, hierarchy depth, top-level categories?)
  2. How many top-level sections?
  3. Which platforms?
  4. Need multitasking on iPad?
  5. SwiftUI or UIKit?

Related Skills

  • hig-foundations -- Layout spacing, margins, safe areas, alignment
  • hig-platforms -- Platform-specific navigation conventions
  • hig-patterns -- Multitasking, full-screen, and launching patterns
  • hig-components-content -- Content displayed within layout containers

Built by Raintree Technology · More developer tools

GitHub 仓库

raintree-technology/claude-starter
路径: templates/.claude/skills/hig-components-layout
0
ai-toolsanthropicclaudeclaude-aiclaude-codedeveloper-tools

相关推荐技能

content-collections

Content Collections 是一个 TypeScript 优先的构建工具,可将本地 Markdown/MDX 文件转换为类型安全的数据集合。它专为构建博客、文档站和内容密集型 Vite+React 应用而设计,提供基于 Zod 的自动模式验证。该工具涵盖从 Vite 插件配置、MDX 编译到生产环境部署的完整工作流。

查看技能

polymarket

这个Claude Skill为开发者提供完整的Polymarket预测市场开发支持,涵盖API调用、交易执行和市场数据分析。关键特性包括实时WebSocket数据流,可监控实时交易、订单和市场动态。开发者可用它构建预测市场应用、实施交易策略并集成实时市场预测功能。

查看技能

creating-opencode-plugins

该Skill帮助开发者创建OpenCode插件,用于接入命令、文件、LSP等25+种事件。它提供了插件结构、事件API规范和JavaScript/TypeScript实现模式,适合需要拦截操作、扩展功能或自定义事件处理的场景。开发者可通过它快速构建响应式模块来增强OpenCode AI助手的能力。

查看技能

sglang

SGLang是一个专为LLM设计的高性能推理框架,特别适用于需要结构化输出的场景。它通过RadixAttention前缀缓存技术,在处理JSON、正则表达式、工具调用等具有重复前缀的复杂工作流时,能实现极速生成。如果你正在构建智能体或多轮对话系统,并追求远超vLLM的推理性能,SGLang是理想选择。

查看技能