app-ui-design by majiayu000/claude-arsenal
npx skills add https://github.com/majiayu000/claude-arsenal --skill app-ui-design遵循 2025 年最佳实践,为设计美观、易访问且符合平台原生特性的移动应用界面提供专家指导。
这些规则是强制性的。违反它们意味着技能无法正常工作。
所有设计必须满足 WCAG 2.2 AA 标准。可访问性不是可选项。
❌ 禁止:
- 文本颜色对比度低于 4.5:1
- 触摸目标小于 44×44pt (iOS) 或 48×48dp (Android)
- 仅通过颜色传达信息
- 图像缺少替代文本
- 无法通过键盘导航的界面
✅ 要求:
- 普通文本最小对比度 4.5:1
- 大文本(18pt+)最小对比度 3:1
- 触摸目标:44×44pt (iOS) / 48×48dp (Android)
- 支持动态类型 / 字体缩放
- 兼容 VoiceOver (iOS) / TalkBack (Android)
- 键盘导航有清晰焦点指示器
遵循特定平台的设计指南。不要混合 iOS 和 Android 模式。
❌ 禁止:
- 在 iOS 上使用 Android 风格的 FAB
- 在 Android 上未经调整使用 iOS 风格的底部操作表
- 混合平台导航模式
- 忽略平台字体排印(SF Pro vs Roboto)
✅ 要求:
iOS (人机界面指南):
- 使用 SF Pro 字体族
- 底部标签栏用于主导航
- 带后退箭头的推送式导航
- 标准 iOS 控件 (UIKit/SwiftUI)
Android (Material Design 3):
- 使用 Roboto 字体族
- 底部导航栏或导航抽屉
- 带涟漪效果的材料组件
- 遵循 Material You 动态主题
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
每个应用都必须有一个有文档记录、包含设计令牌的设计系统。
❌ 禁止:
- 临时使用的颜色和间距值
- 跨屏幕按钮样式不一致
- 多个未命名的字体大小
- 组件没有定义状态
✅ 要求:
设计系统必须包含:
├── 颜色令牌 (primary, secondary, surface, error 等)
├── 字体排印比例 (heading1-6, body, caption 等)
├── 间距比例 (4, 8, 12, 16, 24, 32, 48px)
├── 边框半径令牌 (none, sm, md, lg, full)
├── 阴影/高度令牌 (elevation1-5)
└── 组件库 (button, input, card 等)
所有交互元素必须针对触摸交互进行优化。
❌ 禁止:
- 触摸目标小于最小尺寸
- 交互元素间距过小 (<8px 间隙)
- 重要操作位于拇指可及区域之外
- 依赖悬停的交互
✅ 要求:
- 最小触摸目标:44×44pt (iOS) / 48×48dp (Android)
- 目标间最小间距:8px
- 主要操作位于拇指友好区域(底部 2/3)
- 清晰的点击反馈(涟漪、高亮、缩放)
| 场景 | 方法 | 关键考虑因素 |
|---|---|---|
| 新应用设计 | 从设计系统开始 | 在绘制屏幕前定义令牌 |
| 仅 iOS 应用 | 人机界面指南 | SF Pro,标准 iOS 模式 |
| 仅 Android 应用 | Material Design 3 | Roboto,材料组件 |
| 跨平台应用 | 自适应设计 | 平台特定导航 |
| 重新设计现有应用 | 先进行审计 | 保持心智模型 |
| 可访问性审查 | WCAG 2.2 AA 检查清单 | 对比度、触摸目标、标签 |
## 颜色令牌结构
### 语义颜色
primary → 主品牌色,号召性用语
primary-variant → 用于状态的更深/更浅主色
secondary → 次要操作,强调色
background → 应用背景
surface → 卡片背景,提升的表面
error → 错误状态,破坏性操作
on-primary → 主色上的文本/图标
on-background → 背景上的文本/图标
on-surface → 表面上的文本/图标
### 调色板 (60-30-10 法则)
60% → 中性/背景色
30% → 次要/辅助色
10% → 强调/主色
### 深色模式考虑
- 不要只是反转颜色
- 对深色表面使用去饱和颜色
- 略微降低对比度(避免纯白纯黑)
- 跨模式保持颜色含义
## 移动端字体排印指南
### iOS 字体排印 (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 字体排印 (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
### 最佳实践
- 每个应用最多使用 2-3 种字体族
- 正文字体最小:16px (14px 绝对最小值)
- 行高:正文字体大小的 1.4-1.6 倍
- 支持动态类型 (iOS) / 字体缩放 (Android)
## 8 点网格系统
基础单位:8px
### 间距比例
spacing-0 → 0px
spacing-1 → 4px (半单位)
spacing-2 → 8px (1 单位)
spacing-3 → 12px (1.5 单位)
spacing-4 → 16px (2 单位)
spacing-5 → 24px (3 单位)
spacing-6 → 32px (4 单位)
spacing-7 → 48px (6 单位)
spacing-8 → 64px (8 单位)
### 组件间距
按钮内边距 → 12px 垂直,24px 水平
卡片内边距 → 16px
列表项内边距 → 16px 水平,12px 垂直
区块间距 → 24px-32px
屏幕边缘外边距 → 16px (手机),24px (平板)
### 触摸目标间距
交互元素间最小间隙:8px
推荐间隙:12-16px
## iOS 设计原则
### 核心原则
1. 清晰性 → 文本易读,图标精确,目的明确
2. 遵从性 → UI 帮助理解,不与内容竞争
3. 深度 → 视觉层次和逼真动效传达层级
### 导航模式
- 标签栏 (底部) → 3-5 个主要目的地
- 导航栏 (顶部) → 标题,返回按钮,操作
- 模态操作表 → 临时聚焦的任务
- 弹出框 (iPad) → 上下文选项
### 2025 更新:液态玻璃
- 控件的半透明材质
- 浮动导航元素
- 动态深度和层次结构
- 背景模糊效果
### 安全区域
- 顶部:状态栏 + 灵动岛/刘海
- 底部:主屏幕指示器 (Face ID 设备上为 34pt)
- 使用 safeAreaInsets 进行正确的内容布局
### 标准尺寸
- 导航栏高度:44pt (带大标题时为 96pt)
- 标签栏高度:49pt (Face ID 设备上为 83pt)
- 工具栏高度:44pt
## Material Design 3 原则
### 核心概念
1. Material You → 个性化、自适应、动态色彩
2. 表现力 → 通过设计建立情感连接
3. 可访问性 → 为所有用户设计的包容性设计
### 导航模式
- 底部导航 → 3-5 个主要目的地
- 导航抽屉 → 5+ 个目的地或次要导航
- 导航轨道 → 平板和大屏幕
- 顶部应用栏 → 标题,导航,操作
### Material 3 表现力 (2025)
- 来自用户壁纸的动态色彩
- 弹性、基于物理的运动
- 更粗犷、更具表现力的字体排印
- 圆润、亲切的形状
### 组件形状
- 特小:4dp
- 小:8dp
- 中:12dp
- 大:16dp
- 特大:28dp
- 全圆:50% (药丸形/圆形)
### 标准尺寸
- 应用栏高度:64dp
- 底部导航高度:80dp
- FAB 尺寸:56dp (标准),40dp (小),96dp (大)
## 自适应 UI 模式
### 个性化策略
- 基于行为的内容推荐
- 基于使用模式的自适应 UI 布局
- 智能默认值和预测性操作
- 上下文功能建议
### 实施指南
- 始终提供手动覆盖选项
- 解释推荐内容的原因
- 尊重用户隐私偏好
- 渐进式个性化(不要给新用户造成压力)
## 深色模式最佳实践
### 颜色适配
浅色模式 → 深色模式
White (#FFFFFF) → Dark gray (#121212)
Black (#000000) → White (#FFFFFF)
Primary (vibrant) → Primary (desaturated)
Shadows → Subtle shadows or none
### 表面高度 (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)
### 建议
- 基于系统设置自动切换
- 为浅色/深色模式设置独立的颜色令牌
- 在两种模式下测试对比度
- 考虑 OLED 优化(纯黑)
## 有意义的动效
### 微交互类型
- 反馈 → 按钮按下,表单提交
- 状态 → 加载,成功,错误
- 引导 → 入门提示,工具提示
- 愉悦感 → 庆祝动画,彩蛋
### 动效原则
- 时长:大多数交互 200-500ms
- 缓动:使用自然缓动曲线
- 目的:每个动画都应有原因
- 性能:使用硬件加速属性
### 2025 趋势
- 弹性、基于物理的动画
- 状态间的变形过渡
- 手势驱动的交互
- 为可访问性提供减少动效支持
## 现代视觉风格
### 玻璃态拟物化
属性:
- 背景模糊 (backdrop-filter: blur)
- 透明度 (10-40% 不透明度)
- 细微边框 (1px 白色,20% 不透明度)
- 柔和阴影
用例:
- 覆盖层和模态框
- 图像背景上的卡片
- 导航栏 (iOS 液态玻璃)
注意事项:
- 确保文本可读性
- 考虑性能影响
- 为旧设备提供回退方案
### 软 UI
属性:
- 柔和阴影(亮部和暗部)
- 细微的高度效果
- 柔和的调色板
用例:
- 切换开关
- 输入字段
- 卡片
注意事项:
- 通常无法通过可访问性对比度测试
- 谨慎使用,不作为主要样式
- 始终用实际内容测试
## 视觉可访问性检查清单
### 颜色与对比度
- [ ] 文本对比度 ≥ 4.5:1 (普通),≥ 3:1 (大文本)
- [ ] UI 组件对比度 ≥ 3:1
- [ ] 颜色不是唯一指示器(使用图标、文本)
- [ ] 适用于色盲用户(使用模拟器测试)
### 文本与字体排印
- [ ] 基础字体大小 ≥ 16px
- [ ] 支持动态类型 (iOS) / 字体缩放 (Android)
- [ ] 正文行高 ≥ 字体大小的 1.4 倍
- [ ] 文本可缩放至 200% 而不丢失内容
### 焦点与导航
- [ ] 可见的焦点指示器
- [ ] 逻辑 Tab 键顺序
- [ ] 为重复内容提供跳过链接
- [ ] 键盘可访问(外部键盘)
## 运动可访问性检查清单
### 触摸目标
- [ ] 最小尺寸:44×44pt (iOS) / 48×48dp (Android)
- [ ] 目标间间距 ≥ 8px
- [ ] 没有时间限制的交互(或可延长)
- [ ] 提供拖拽手势的替代方案 (WCAG 2.2)
### 交互
- [ ] 所有操作均可单次点击完成(无需双击)
- [ ] 破坏性操作提供撤销选项
- [ ] 没有精度要求(精细运动)
- [ ] 支持切换控制 / 语音访问
## 屏幕阅读器检查清单
### 内容
- [ ] 所有图像都有描述性替代文本
- [ ] 装饰性图像有空的替代文本 (alt="")
- [ ] 按钮/链接有描述性标签
- [ ] 表单输入有关联标签
- [ ] 标题用于结构(而非样式)
### 导航
- [ ] 逻辑阅读顺序
- [ ] 有意义的链接文本(非“点击此处”)
- [ ] 状态变化有播报
- [ ] 模态框焦点正确捕获
- [ ] 自定义组件有 ARIA 角色
## 按钮层级
### 主要按钮
- 屏幕上最重要的操作
- 填充/实心样式
- 高对比度
- 每个视图区域仅一个
### 次要按钮
- 替代操作
- 轮廓或色调样式
- 中等对比度
### 三级按钮
- 低优先级操作
- 仅文本或幽灵样式
- 外观低调
### 破坏性按钮
- 删除、移除、取消
- 红色/错误颜色
- 重要数据需要确认
### 按钮状态
- 默认 → 正常外观
- 按下 → 缩小,颜色加深
- 禁用 → 50% 不透明度,无交互
- 加载中 → 旋转指示器,禁用
## 表单最佳实践
### 输入字段
- 清晰的标签(在输入框上方,非仅占位符)
- 有帮助的占位符文本
- 带具体消息的错误状态
- 成功验证反馈
- 合适的键盘类型
### 布局
- 移动端使用单列
- 分组相关字段
- 逻辑 Tab 键顺序
- 主要操作在底部
- 长表单使用粘性提交按钮
### 验证
- 内联验证(失去焦点后或输入后)
- 清晰的错误消息及修复建议
- 出错时不清除字段
- 明确标记必填字段
## 移动端导航
### 底部导航 (主要)
- 3-5 个目的地
- 图标 + 标签
- 活动状态指示器
- 跨应用一致
### 标签栏 (内容切换)
- 水平标签用于相关内容
- 标签间可滑动切换
- 活动标签指示器
### 导航栈
- 清晰的返回导航
- 有意义的标题
- 深层级结构的面包屑
### 手势
- 滑动返回 (iOS 标准)
- 下拉刷新
- 列表项滑动操作
- 长按呼出上下文菜单
## 应用设计工作流
1. 研究与发现
├── 用户研究和用户画像
├── 竞品分析
├── 平台指南审查
└── 技术限制
2. 信息架构
├── 用户流程
├── 导航结构
├── 内容层级
└── 网站地图
3. 设计系统设置
├── 颜色令牌
├── 字体排印比例
├── 间距系统
├── 组件库
└── 图标集
4. 线框图
├── 低保真布局
├── 流程验证
├── 利益相关者评审
└── 迭代
5. 视觉设计
├── 高保真模型
├── 交互设计
├── 原型创建
└── 可访问性审计
6. 交付与实施
├── 设计规范文档
├── 资产导出
├── 与开发者协作
└── QA 评审
## 常见错误
### 视觉设计
❌ 使用超过 3 种字体
❌ 不一致的间距值
❌ 低对比度文本
❌ 过于复杂的渐变/效果
❌ 忽略安全区域
### 交互设计
❌ 隐藏式导航
❌ 仅手势操作且无替代方案
❌ 过小的触摸目标
❌ 无加载状态
❌ 混乱的返回导航
### 可访问性
❌ 仅占位符标签
❌ 仅通过颜色传达信息
❌ 自动播放媒体
❌ 有时间限制的交互且不可延长
❌ 缺少屏幕阅读器标签
### 平台
❌ 在 Android 上使用 iOS 模式(反之亦然)
❌ 标准控件可用时使用自定义控件
❌ 忽略平台惯例
❌ 不支持深色模式
研究基于 2025 年最佳实践,来源包括:
每周安装量
159
仓库
GitHub 星标
13
首次出现
Jan 22, 2026
安全审计
安装于
opencode142
gemini-cli135
codex134
cursor130
github-copilot116
claude-code110
Expert guidance for designing beautiful, accessible, and platform-native mobile app interfaces following 2025 best practices.
These rules are mandatory. Violating them means the skill is not working correctly.
All designs must meet WCAG 2.2 AA standards. Accessibility is not optional.
❌ 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
Follow platform-specific design guidelines. Do not mix iOS and Android patterns.
❌ 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
Every app must have a documented design system with tokens.
❌ 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.)
All interactive elements must be optimized for touch interaction.
❌ 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)
| Scenario | Approach | Key Considerations |
|---|---|---|
| New app design | Start with design system | Define tokens before screens |
| iOS-only app | Human Interface Guidelines | SF Pro, standard iOS patterns |
| Android-only app | Material Design 3 | Roboto, Material components |
| Cross-platform app | Adaptive design | Platform-specific navigation |
| Redesign existing app | Audit first | Maintain mental models |
| Accessibility review | WCAG 2.2 AA checklist | Contrast, touch targets, labels |
## 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 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
## 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)
## 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
## Vision Accessibility Checklist
### Color & Contrast
- [ ] Text contrast ≥ 4.5:1 (normal), ≥ 3:1 (large)
- [ ] UI component contrast ≥ 3:1
- [ ] Color is not the only indicator (use icons, text)
- [ ] Works for colorblind users (test with simulators)
### Text & Typography
- [ ] Base font size ≥ 16px
- [ ] Supports Dynamic Type (iOS) / Font Scaling (Android)
- [ ] Line height ≥ 1.4× for body text
- [ ] Text can scale to 200% without loss of content
### Focus & Navigation
- [ ] Visible focus indicators
- [ ] Logical tab order
- [ ] Skip links for repetitive content
- [ ] Keyboard-accessible (external keyboards)
## Motor Accessibility Checklist
### Touch Targets
- [ ] Minimum size: 44×44pt (iOS) / 48×48dp (Android)
- [ ] Spacing between targets ≥ 8px
- [ ] No time-limited interactions (or extendable)
- [ ] Alternative to drag gestures (WCAG 2.2)
### Interaction
- [ ] Single-tap for all actions (no double-tap required)
- [ ] Undo available for destructive actions
- [ ] No precision requirements (fine motor)
- [ ] Support for Switch Control / Voice Access
## Screen Reader Checklist
### Content
- [ ] All images have descriptive alt text
- [ ] Decorative images have empty alt (alt="")
- [ ] Buttons/links have descriptive labels
- [ ] Form inputs have associated labels
- [ ] Headings used for structure (not styling)
### Navigation
- [ ] Logical reading order
- [ ] Meaningful link text (not "click here")
- [ ] State changes announced
- [ ] Modal focus properly trapped
- [ ] Custom components have ARIA roles
## Button Hierarchy
### Primary Button
- Most important action on screen
- Filled/solid style
- High contrast
- Only ONE per view section
### Secondary Button
- Alternative actions
- Outlined or tonal style
- Medium contrast
### Tertiary Button
- Low-priority actions
- Text-only or ghost style
- Subtle appearance
### Destructive Button
- Delete, remove, cancel
- Red/error color
- Requires confirmation for important data
### Button States
- Default → Normal appearance
- Pressed → Scale down, darker
- Disabled → 50% opacity, no interaction
- Loading → Spinner, disabled
## Form Best Practices
### Input Fields
- Clear labels (above input, not placeholder-only)
- Helpful placeholder text
- Error states with specific messages
- Success validation feedback
- Appropriate keyboard types
### Layout
- Single column for mobile
- Group related fields
- Logical tab order
- Primary action at bottom
- Sticky submit button if long form
### Validation
- Inline validation (on blur or after input)
- Clear error messages with fix suggestions
- Don't clear fields on error
- Mark required fields clearly
## Mobile Navigation
### Bottom Navigation (Primary)
- 3-5 destinations
- Icons + labels
- Active state indicator
- Consistent across app
### Tab Bar (Content Switching)
- Horizontal tabs for related content
- Swipe between tabs
- Indicator for active tab
### Navigation Stack
- Clear back navigation
- Meaningful titles
- Breadcrumbs for deep hierarchies
### Gestures
- Swipe back (iOS standard)
- Pull to refresh
- Swipe actions on list items
- Long press for context menus
## App Design Workflow
1. Research & Discovery
├── User research and personas
├── Competitor analysis
├── Platform guidelines review
└── Technical constraints
2. Information Architecture
├── User flows
├── Navigation structure
├── Content hierarchy
└── Sitemap
3. Design System Setup
├── Color tokens
├── Typography scale
├── Spacing system
├── Component library
└── Icon set
4. Wireframing
├── Low-fidelity layouts
├── Flow validation
├── Stakeholder review
└── Iteration
5. Visual Design
├── High-fidelity mockups
├── Interaction design
├── Prototype creation
└── Accessibility audit
6. Handoff & Implementation
├── Design specs documentation
├── Asset export
├── Developer collaboration
└── QA review
## Common Mistakes
### Visual Design
❌ Using more than 3 fonts
❌ Inconsistent spacing values
❌ Low contrast text
❌ Overly complex gradients/effects
❌ Ignoring safe areas
### Interaction Design
❌ Hidden navigation
❌ Gesture-only actions without alternatives
❌ Tiny touch targets
❌ No loading states
❌ Confusing back navigation
### Accessibility
❌ Placeholder-only labels
❌ Color-only information
❌ Auto-playing media
❌ Timed interactions without extension
❌ Missing screen reader labels
### Platform
❌ iOS patterns on Android (or vice versa)
❌ Custom controls when standard works
❌ Ignoring platform conventions
❌ Not supporting dark mode
Research based on 2025 best practices from:
Weekly Installs
159
Repository
GitHub Stars
13
First Seen
Jan 22, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
opencode142
gemini-cli135
codex134
cursor130
github-copilot116
claude-code110
前端设计技能指南:避免AI垃圾美学,打造独特生产级界面
49,900 周安装
散文风格诊断技能:识别小说句子写作问题,提升写作质量与故事表现力
150 周安装
GitHub Copilot CLI 委托技能:非交互式命令、模型选择与安全权限指南
153 周安装
Claude Code 多智能体编排系统 - 基于 Git 的轻量级任务追踪与工作流管理
150 周安装
Next.js useSearchParams Suspense 模式详解:解决URL参数读取与服务器端渲染问题
151 周安装
财报交易分析器 - 五因子评分系统,精准识别财报后动量交易机会
157 周安装
Vercel AI SDK v6 完整指南:实现聊天、工具调用、结构化输出与智能体
150 周安装