Loading...
Loading...
Compare original and translation side by side
TeamCreateTeamCreate| Feature | Description |
|---|---|
| Framer Motion | Animation library (REQUIRED) |
| Stagger | List/grid reveal patterns |
| Hover/Tap | Interactive micro-animations |
| Accessibility | prefers-reduced-motion support |
| 特性 | 说明 |
|---|---|
| Framer Motion | 动画库(必须使用) |
| Stagger | 列表/网格渐显模式 |
| Hover/Tap | 交互式微动画 |
| Accessibility | 支持prefers-reduced-motion(减少动效偏好) |
| Interaction | Duration | Easing |
|---|---|---|
| Hover | 50-100ms | ease-out |
| Button press | 100-150ms | ease-out |
| Modal open | 200-300ms | ease-out |
| Page transition | 300-400ms | ease-in-out |
| 交互类型 | 时长 | 缓动函数 |
|---|---|---|
| 悬停 | 50-100ms | ease-out |
| 按钮按压 | 100-150ms | ease-out |
| 模态框打开 | 200-300ms | ease-out |
| 页面过渡 | 300-400ms | ease-in-out |
| Topic | Reference | When to Consult |
|---|---|---|
| Motion Patterns | motion-patterns.md | Framer Motion examples |
| Buttons | buttons-guide.md | Hover/press timing |
| Cards | cards-guide.md | Card hover effects |
| UI Design | ui-visual-design.md | Micro-interactions |
| Card Patterns | patterns-cards.md | Card animations |
| Button Patterns | patterns-buttons.md | Button animations |
| Navigation | patterns-navigation.md | Nav animations |
| Micro-interactions | patterns-microinteractions.md | Small details |
| 主题 | 参考文档 | 适用场景 |
|---|---|---|
| 动效模式 | motion-patterns.md | Framer Motion示例 |
| 按钮 | buttons-guide.md | 悬停/按压时间规范 |
| 卡片 | cards-guide.md | 卡片悬停效果 |
| UI设计 | ui-visual-design.md | 微交互 |
| 卡片模式 | patterns-cards.md | 卡片动画 |
| 按钮模式 | patterns-buttons.md | 按钮动画 |
| 导航 | patterns-navigation.md | 导航动画 |
| 微交互 | patterns-microinteractions.md | 细节动效 |
const container = {
hidden: { opacity: 0 },
show: { opacity: 1, transition: { staggerChildren: 0.1 } }
};
const item = {
hidden: { opacity: 0, y: 20 },
show: { opacity: 1, y: 0 }
};
<motion.div variants={container} initial="hidden" animate="show">
<motion.div variants={item}>Item 1</motion.div>
<motion.div variants={item}>Item 2</motion.div>
</motion.div>const container = {
hidden: { opacity: 0 },
show: { opacity: 1, transition: { staggerChildren: 0.1 } }
};
const item = {
hidden: { opacity: 0, y: 20 },
show: { opacity: 1, y: 0 }
};
<motion.div variants={container} initial="hidden" animate="show">
<motion.div variants={item}>Item 1</motion.div>
<motion.div variants={item}>Item 2</motion.div>
</motion.div>// Card hover
<motion.div whileHover={{ y: -4 }} transition={{ duration: 0.2 }}>
// Button hover
<motion.button whileHover={{ scale: 1.02 }} whileTap={{ scale: 0.98 }}>// Card hover
<motion.div whileHover={{ y: -4 }} transition={{ duration: 0.2 }}>
// Button hover
<motion.button whileHover={{ scale: 1.02 }} whileTap={{ scale: 0.98 }}><motion.div
initial={{ opacity: 0, y: 40 }}
whileInView={{ opacity: 1, y: 0 }}
viewport={{ once: true, margin: "-100px" }}
/><motion.div
initial={{ opacity: 0, y: 40 }}
whileInView={{ opacity: 1, y: 0 }}
viewport={{ once: true, margin: "-100px" }}
/>import { useReducedMotion } from "framer-motion";
const shouldReduce = useReducedMotion();
<motion.div
animate={shouldReduce ? {} : { y: 0 }}
transition={shouldReduce ? { duration: 0 } : { duration: 0.3 }}
/>import { useReducedMotion } from "framer-motion";
const shouldReduce = useReducedMotion();
<motion.div
animate={shouldReduce ? {} : { y: 0 }}
transition={shouldReduce ? { duration: 0 } : { duration: 0.3 }}
/>// ❌ Random bouncing loops
animate={{ y: [0, -10, 0] }}
transition={{ repeat: Infinity }}
// ❌ Excessive effects
whileHover={{ scale: 1.2, rotate: 5 }}
// ❌ Slow animations
transition={{ duration: 1.5 }}// ❌ 随机弹跳循环
animate={{ y: [0, -10, 0] }}
transition={{ repeat: Infinity }}
// ❌ 过度效果
whileHover={{ scale: 1.2, rotate: 5 }}
// ❌ 缓慢动画
transition={{ duration: 1.5 }}