interaction-design
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseInteraction Design
交互设计
Create engaging, intuitive interactions through motion, feedback, and thoughtful state transitions.
通过动效、反馈和周密的状态转场,创建生动且直观的交互体验。
Project Conventions
项目约定
- Preferred library: Framer Motion for React component animations
- CSS animations: Use and
transformonly for 60fps performanceopacity - Spring physics: Prefer spring animations over linear/eased for interactive elements
- Interruptible: Users must be able to cancel or override any animation
- 首选库: 使用 Framer Motion 为 React 组件添加动画
- CSS 动画: 仅使用 和
transform,以保持 60fps 性能opacity - 弹簧物理: 交互元素优先使用弹簧动画,而非线性动画或缓动动画
- 可中断: 用户必须能够取消或覆盖任何动画
Timing Scale
时间尺度
| Duration | Use Case |
|---|---|
| 100-150ms | Micro-feedback (hovers, clicks) |
| 200-300ms | Small transitions (toggles, dropdowns) |
| 300-500ms | Medium transitions (modals, page changes) |
| 500ms+ | Complex choreographed animations |
| 时长 | 使用场景 |
|---|---|
| 100-150ms | 微反馈(悬停、点击) |
| 200-300ms | 小型转场(开关、下拉菜单) |
| 300-500ms | 中型转场(模态框、页面切换) |
| 500ms 以上 | 复杂的编排动画 |
Accessibility
无障碍
Always respect . Set animation duration to 0 when the user prefers reduced motion. This is non-negotiable.
prefers-reduced-motion: reduce始终遵循 。当用户偏好减少动态效果时,将动画时长设置为 0。这是不可妥协的要求。
prefers-reduced-motion: reduceReference Files
参考文件
Read these on demand based on the task:
| File | When to read |
|---|---|
| animation-libraries.md | Choosing or configuring Framer Motion, GSAP, or CSS-based approaches |
| microinteraction-patterns.md | Building button feedback, toggles, ripples, loading indicators, toasts |
| scroll-animations.md | Implementing scroll-triggered reveals, parallax, or intersection-based animations |
根据任务需要按需阅读以下文件:
| 文件 | 阅读时机 |
|---|---|
| animation-libraries.md | 选择或配置 Framer Motion、GSAP 或基于 CSS 的方案 |
| microinteraction-patterns.md | 构建按钮反馈、开关、涟漪效果、加载指示器和 toast |
| scroll-animations.md | 实现滚动触发的显示效果、视差效果或基于交叉观察器的动画 |