关于 app-ui-design
为移动应用界面设计提供指导的 skill,面向设计新应用、改版和无障碍审查的设计人员。内容结合 iOS 与 Android 平台规范,并强调 WCAG 2.2 AA、触控友好性和一致的设计系统。
主要功能
- 01遵循 iOS 与 Android 平台规范
- 02以 WCAG 2.2 AA 为无障碍基准
- 03建立包含设计令牌的系统
- 04提供触控尺寸与间距指导
- 05涵盖移动端视觉与交互模式
适用场景
- 01规划新移动应用的设计系统
- 02为 iOS 或 Android 设计平台原生界面
- 03为跨平台应用设计适配界面
- 04审查现有应用的无障碍体验
安装
复制下面的命令,在终端中运行。
$
npx skills add https:/ / github.com/ majiayu000/ spellbook --skill app-ui-design安装后在 Claude Code 中输入/app-ui-design确认已加载。
包含的文件
除 SKILL.md 外,安装时一起下载的参考资料和脚本。
reference/accessibility.mdcolor-theory.mdextended.mdios-guidelines.mdmaterial-design.mdtemplates/design-system-template.md详细介绍
移动应用 UI 设计
遵循 2025 年最佳实践,设计美观、易访问且符合平台原生规范的移动应用界面的专业指南。
核心理念
- 用户优先设计 — 将用户需求、行为和心智模型置于美学之上
- 保持平台一致性 — 遵循 iOS HIG 和 Android Material Design 指南
- 以无障碍为基础 — 从一开始就为所有用户进行设计,而非事后补充
- 情感化设计 — 创建能让用户产生情感共鸣的界面
- 注重性能 — 在不牺牲应用性能的前提下实现精美设计
硬性规则(必须遵守)
以下规则为强制要求。违反规则意味着此技能未能正常工作。
无障碍优先
所有设计都必须符合 WCAG 2.2 AA 标准。无障碍不是可选项。
❌ FORBIDDEN:
- Color contrast below 4.5:1 for text
- Touch targets smaller than 44×44pt (iOS) or 48×48dp (Android)
- Information conveyed by color alone
- Missing alternative text for images
- Non-keyboard-navigable interfaces
✅ REQUIRED:
- Minimum 4.5:1 contrast ratio for normal text
- Minimum 3:1 contrast ratio for large text (18pt+)
- Touch targets: 44×44pt (iOS) / 48×48dp (Android)
- Support for Dynamic Type / Font Scaling
- VoiceOver (iOS) / TalkBack (Android) compatibility
- Clear focus indicators for keyboard navigation
遵循平台指南
遵循平台专属设计指南。不要混用 iOS 和 Android 的设计模式。
❌ FORBIDDEN:
- Using Android-style FAB on iOS
- Using iOS-style bottom sheets on Android without adaptation
- Mixing platform navigation patterns
- Ignoring platform typography (SF Pro vs Roboto)
✅ REQUIRED:
iOS (Human Interface Guidelines):
- Use SF Pro font family
- Tab bar at bottom for primary navigation
- Push navigation with back chevron
- Standard iOS controls (UIKit/SwiftUI)
Android (Material Design 3):
- Use Roboto font family
- Bottom navigation bar or navigation drawer
- Material components with ripple effects
- Follow Material You dynamic theming
一致的设计系统
每个应用都必须有一套包含设计令牌的文档化设计系统。
❌ FORBIDDEN:
- Ad-hoc colors and spacing values
- Inconsistent button styles across screens
- Multiple unnamed font sizes
- Components without defined states
✅ REQUIRED:
Design System Must Include:
├── Color Tokens (primary, secondary, surface, error, etc.)
├── Typography Scale (heading1-6, body, caption, etc.)
├── Spacing Scale (4, 8, 12, 16, 24, 32, 48px)
├── Border Radius Tokens (none, sm, md, lg, full)
├── Shadow/Elevation Tokens (elevation1-5)
└── Component Library (button, input, card, etc.)
适合触控操作的设计
所有交互元素都必须针对触控操作进行优化。
❌ FORBIDDEN:
- Touch targets smaller than minimum size
- Interactive elements too close together (<8px gap)
- Important actions outside thumb reach zone
- Hover-dependent interactions
✅ REQUIRED:
- Minimum touch target: 44×44pt (iOS) / 48×48dp (Android)
- Minimum spacing between targets: 8px
- Primary actions in thumb-friendly zone (bottom 2/3)
- Clear tap feedback (ripple, highlight, scale)
快速参考
适用场景与方法
| 场景 | 方法 | 关键考量 |
|---|---|---|
| 设计新应用 | 从设计系统入手 | 在设计屏幕前定义设计令牌 |
| 仅限 iOS 的应用 | Human Interface Guidelines | SF Pro、标准 iOS 设计模式 |
| 仅限 Android 的应用 | Material Design 3 | Roboto、Material 组件 |
| 跨平台应用 | 自适应设计 | 平台专属导航 |
| 重新设计现有应用 | 先进行审查 | 保持心智模型 |
| 无障碍审查 | WCAG 2.2 AA 检查清单 | 对比度、触控目标、标签 |
设计系统基础
色彩系统
## Color Token Structure
### Semantic Colors
primary → Main brand color, CTAs
primary-variant → Darker/lighter primary for states
secondary → Secondary actions, accents
background → App background
surface → Card backgrounds, elevated surfaces
error → Error states, destructive actions
on-primary → Text/icons on primary color
on-background → Text/icons on background
on-surface → Text/icons on surface
### Color Palette (60-30-10 Rule)
60% → Neutral/background colors
30% → Secondary/supporting colors
10% → Accent/primary colors
### Dark Mode Considerations
- Don't just invert colors
- Use desaturated colors for dark surfaces
- Reduce contrast slightly (avoid pure white on black)
- Maintain color meaning across modes
字体排版比例
## Mobile Typography Guidelines
### iOS Typography (SF Pro)
Large Title → 34pt, Bold
Title 1 → 28pt, Bold
Title 2 → 22pt, Bold
Title 3 → 20pt, Semibold
Headline → 17pt, Semibold
Body → 17pt, Regular
Callout → 16pt, Regular
Subhead → 15pt, Regular
Footnote → 13pt, Regular
Caption 1 → 12pt, Regular
Caption 2 → 11pt, Regular
### Android Typography (Roboto / Material 3)
Display Large → 57sp
Display Medium → 45sp
Display Small → 36sp
Headline Large → 32sp
Headline Medium→ 28sp
Headline Small → 24sp
Title Large → 22sp
Title Medium → 16sp, Medium
Title Small → 14sp, Medium
Body Large → 16sp
Body Medium → 14sp
Body Small → 12sp
Label Large → 14sp, Medium
Label Medium → 12sp, Medium
Label Small → 11sp, Medium
### Best Practices
- Maximum 2-3 font families per app
- Minimum body text: 16px (14px absolute minimum)
- Line height: 1.4-1.6× font size for body text
- Support Dynamic Type (iOS) / Font Scaling (Android)
间距系统
## 8-Point Grid System
Base Unit: 8px
### Spacing Scale
spacing-0 → 0px
spacing-1 → 4px (half unit)
spacing-2 → 8px (1 unit)
spacing-3 → 12px (1.5 units)
spacing-4 → 16px (2 units)
spacing-5 → 24px (3 units)
spacing-6 → 32px (4 units)
spacing-7 → 48px (6 units)
spacing-8 → 64px (8 units)
### Component Spacing
Button padding → 12px vertical, 24px horizontal
Card padding → 16px
List item padding → 16px horizontal, 12px vertical
Section spacing → 24px-32px
Screen edge margin → 16px (phones), 24px (tablets)
### Touch Target Spacing
Minimum gap between interactive elements: 8px
Recommended gap: 12-16px
平台指南
iOS Human Interface Guidelines
## iOS Design Principles
### Core Principles
1. Clarity → Text legible, icons precise, purpose obvious
2. Deference → UI helps understanding, not competing with content
3. Depth → Visual layers and realistic motion convey hierarchy
### Navigation Patterns
- Tab Bar (bottom) → 3-5 primary destinations
- Navigation Bar (top) → Title, back button, actions
- Modal sheets → Temporary focused tasks
- Popovers (iPad) → Contextual options
### 2025 Updates: Liquid Glass
- Translucent materials for controls
- Floating navigation elements
- Dynamic depth and hierarchy
- Background blur effects
### Safe Areas
- Top: Status bar + Dynamic Island/Notch
- Bottom: Home indicator (34pt on Face ID devices)
- Use safeAreaInsets for proper content placement
### Standard Dimensions
- Navigation bar height: 44pt (96pt with large title)
- Tab bar height: 49pt (83pt on Face ID devices)
- Toolbar height: 44pt
Android Material Design 3
## Material Design 3 Principles
### Core Concepts
1. Material You → Personal, adaptive, dynamic color
2. Expressiveness → Emotional connection through design
3. Accessibility → Inclusive design for all users
### Navigation Patterns
- Bottom Navigation → 3-5 primary destinations
- Navigation Drawer → 5+ destinations or secondary nav
- Navigation Rail → Tablets and large screens
- Top App Bar → Title, navigation, actions
### Material 3 Expressive (2025)
- Dynamic color from user wallpaper
- Springy, physics-based motion
- Bolder, more expressive typography
- Rounded, approachable shapes
### Component Shapes
- Extra Small: 4dp
- Small: 8dp
- Medium: 12dp
- Large: 16dp
- Extra Large: 28dp
- Full: 50% (pills/circles)
### Standard Dimensions
- App bar height: 64dp
- Bottom navigation height: 80dp
- FAB size: 56dp (standard), 40dp (small), 96dp (large)
2025 年设计趋势
AI 驱动的个性化
## Adaptive UI Patterns
### Personalization Strategies
- Content recommendations based on behavior
- Adaptive UI layouts based on usage patterns
- Smart defaults and predictive actions
- Contextual feature suggestions
### Implementation Guidelines
- Always provide manual override options
- Explain why content is recommended
- Respect user privacy preferences
- Gradual personalization (don't overwhelm new users)
出色的深色模式
## Dark Mode Best Practices
### Color Adaptation
Light Mode → Dark Mode
White (#FFFFFF) → Dark gray (#121212)
Black (#000000) → White (#FFFFFF)
Primary (vibrant) → Primary (desaturated)
Shadows → Subtle shadows or none
### Surface Elevation (Material 3)
Elevation 0 → #121212
Elevation 1 → #1E1E1E (+ 5% white overlay)
Elevation 2 → #232323 (+ 7% white overlay)
Elevation 3 → #272727 (+ 8% white overlay)
Elevation 4 → #2C2C2C (+ 9% white overlay)
Elevation 5 → #323232 (+ 11% white overlay)
### Recommendations
- Auto-switch based on system setting
- Separate color tokens for light/dark
- Test contrast in both modes
- Consider OLED optimization (true blacks)
微交互
## Meaningful Motion
### Types of Microinteractions
- Feedback → Button press, form submission
- State → Loading, success, error
- Guidance → Onboarding hints, tooltips
- Delight → Celebration animations, easter eggs
### Motion Principles
- Duration: 200-500ms for most interactions
- Easing: Use natural easing curves
- Purpose: Every animation should have a reason
- Performance: Use hardware-accelerated properties
### 2025 Trends
- Springy, physics-based animations
- Morphing transitions between states
- Gesture-driven interactions
- Reduced motion support for accessibility
玻璃拟态与新拟态
## Modern Visual Styles
### Glassmorphism
Properties:
- Background blur (backdrop-filter: blur)
- Transparency (10-40% opacity)
- Subtle border (1px white at 20% opacity)
- Soft shadow
Use Cases:
- Overlays and modals
- Cards on image backgrounds
- Navigation bars (iOS Liquid Glass)
Caution:
- Ensure text readability
- Consider performance impact
- Provide fallback for older devices
### Neumorphism (Soft UI)
Properties:
- Soft shadows (light and dark)
- Subtle elevation effect
- Muted color palette
Use Cases:
- Toggle switches
- Input fields
- Cards
Caution:
- Often fails accessibility contrast tests
- Use sparingly, not as primary style
- Always test with actual content
扩展参考
为保持此技能简洁,从 ## Accessibility Checklist 开始的详细资料已移至 reference/extended.md。当任务需要其中已移出的示例、命令目录、检查清单、平台详情或实现模板时,请加载该参考资料。
评论
支持 Markdown