提供适用于 React/Next.js 的高质量动画模式,快速实现常见交互动效。
该技能材料显示其为开源的纯提示/文档型前端动画模式集合,不要求密钥,也未声明任何远程端点或本地执行能力。基于材料事实与较高社区采用度,整体风险较低,主要注意点在于许可证未声明及维护状态未知的供应链信息不完整。
材料明确注明无需密钥或环境变量,未见要求输入 API token、账号凭证或其他敏感认证信息,凭证泄露与滥用面较低。
系统检查项标记为 prompt-only,且材料声明无远程端点;从提供内容看更像本地可复制的 UI 动画说明/模式,不涉及将用户数据发送到外部服务。
未见安装脚本、命令执行、启动本地进程或系统调用说明;材料内容主要是 React/Next.js 动画实践规则与示例 guidance,本身不授予执行权限。
未声明读取或写入本地文件、数据库、剪贴板、浏览器存储或其他用户数据资源;按现有材料看,其作用限于提供代码模式与文档建议,数据访问范围很小。
来源为 GitHub 开源仓库,且社区采用度很高,这是明显的降风险因素;但许可证未声明、维护状态未知,README 还引用外部依赖概念 `motion-foundations`,供应链透明度并非完全充分,因此建议保持留意而非视为高风险。
复制安装指令,让 AI 自动完成配置 · 推荐新手
请帮我安装 askskill 上的 "motion-patterns" 技能: 1. 下载 https://raw.githubusercontent.com/affaan-m/ECC/main/skills/motion-patterns/SKILL.md 2. 保存为 ~/.claude/skills/motion-patterns/SKILL.md 3. 装好后重载技能,告诉我可以用了
请为我的 Next.js 应用设计一套页面切换动画方案,包含进入、退出、共享布局过渡,并给出可复用的 React 组件示例。
输出一套可直接集成到 Next.js 项目的页面切换动画模式与代码示例。
请给我一套适用于 React 的按钮悬停、点击反馈和弹窗打开关闭动画模式,要求参数统一、易于复用。
输出统一风格的按钮与弹窗动画实现方案,包括动效说明和组件代码。
请为我的 React 仪表盘提供列表错峰进入、Toast 通知出现消失、滚动触发动画的最佳实践和示例代码。
输出适合仪表盘场景的错峰、通知和滚动动画模式及其实现细节。
Copy-paste patterns for the most common UI animation needs.
Every pattern here is built on motion-foundations tokens and springs.
Do not define new duration or easing values here — import them.
This skill produces:
AnimatePresence-wrapped conditional renders with correct exit behavioruseScroll + useTransformlayout, layoutId) for expanding and crossfading elementsmotion-foundations. No raw numbers.AnimatePresence with a key.layout is used only for small, isolated shifts. Large subtrees get explicit transforms.AnimatePresence with a key on the direct child. Without a key, exit animations never fire.exit when defining initial + animate. An animation without an exit is incomplete.mode="wait" on page transitions. Enter must not start until exit completes.layout on subtrees with more than ~5 children or deeply nested DOM. Use explicit x/y transforms instead.0.05s and 0.10s. Below feels mechanical; above feels sluggish.role="dialog", aria-modal="true".viewport={{ once: true }}. Repeating on scroll-out is distracting, not informative.motion-foundations. No inline numbers.| Situation | Pattern |
|---|---|
| Element appears / disappears | AnimatePresence |
| List of items loading in sequence | Stagger variants |
| Navigating between routes | Page transition wrapper |
| Element changes size in place | layout prop |
| Same element moves across page contexts | layoutId |
| Element enters when scrolled into view | whileInView |
| Value tied to scroll position | useScroll + useTransform |
mode="wait" vs mode="sync"| Mode | Use when |
|---|---|
wait | Page transitions, content swaps (one at a time) |
sync | Stacked notifications, list items (overlap is fine) |
popLayout | Items removed from a reflow list |
Three things must always be true:
AnimatePresence wraps the conditionalkeyexit propMiss any one of these and the exit animation silently fails.
layout — animates the element's own size/position change in placelayoutId — links two separate elements, crossfading between them across rendersUse layout="position" on text inside an expanding container to prevent text reflow from animating.
"use client"
import { motion } from "motion/react"
import { springs, motionTokens } from "@/lib/motion-tokens"
<motion.button
whileHover={{ scale: motionTokens.scale.pop }}
whileTap={{ scale: motionTokens.scale.press }}
…
帮助 Swift 开发者用协议依赖注入编写可测试代码并高效构建 Mock。
用生成器与评估器协同流程,自动迭代构建高质量应用原型与代码。
用 Flox 为项目创建可复现、跨平台且免污染的开发环境。
帮助团队统筹 GitHub 与 Linear 的任务流、PR 分诊和执行协同。
帮助开发者发现并评估 Laravel 插件,检查健康度与兼容性
帮助用户掌握 Kubernetes 生产部署模式、权限配置与排障方法。
帮助你为 React/Next.js 产品实现可复用的界面动效与过渡方案。
帮助你在 React/Next.js 中实现高级动效、手势交互与动画编排。
为 React/Next.js 动效系统建立规范基座,统一令牌、弹簧预设、性能与无障碍规则。
帮助你梳理 React 与 Next.js 前端模式、状态管理及性能优化最佳实践
将滚动动效需求转成可验证规范,并编译为确定性的 GSAP/CSS 实现
为 React 项目生成准确的 Motion 动画代码与正确导入配置