animejs-animation
它能做什么
这个工具可以使用 JavaScript 代码为网站创建复杂而流畅的动画。它能让视觉元素以精细的方式移动、改变大小或出现。
适用场景
- ✓制作多阶段的落地页动画时。
- ✓让元素按顺序依次出现(错落效果)时。
- ✓为矢量图形(SVG)制作动画,创建动态的形状或线条时。
技能链接
https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/animejs-animation/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
📦 包含此技能的技能包
可以这样问 AI
“为页面的标题和主图创建一个动画:标题先轻微移动着出现,然后主图再浮现出来。”
每周 5 个新技能,1 分钟读完。
工作原理
你需要指定页面中哪些元素需要动画,以及它们应该如何移动(例如从下往上、逐渐缩小)。这个工具会把这些指令组合起来,生成流畅、可控的动画序列。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Anime.js Animation Skill
Anime.js is a lightweight but extremely powerful JavaScript animation engine. It excels at complex timelines, staggering, and precise control over DOM, CSS, and SVGs.
Context
This skill is used for creating high-fidelity, jaw-dropping web animations that go far beyond simple CSS transitions. It's the tool of choice for awards-caliber interactive sites.
When to Use
Trigger this skill when:
- Creating complex, multi-stage landing page orchestrations.
- Implementing staggered animations for revealing grids, text, or data visualizations.
- Animating SVG paths (morphing shapes, drawing dynamic lines).
- Building highly interactive, kinetic UI elements that respond fluidly to user input.
Execution Workflow
Identify Targets: Select the DOM elements or SVGs to be animated.
Define Properties & Easing: Specify values to animate. Crucially, utilize advanced easing functions (e.g., custom
cubicBezier,spring, orelastic) instead of basiclinearorease-in-outto make the motion feel expensive and natural.Orchestrate Timelines: Inspect the installed major version first. This example targets Anime.js v3; use
anime.timeline()to sequence complex choreography. Master the use of timeline offsets (relative'-=200'vs absolute) to create seamless overlapping motion.Implement: For a bundler with Anime.js v3 installed,
import anime from "animejs";supplies theanimebinding. The selectors must exist in the rendered DOM.const tl = anime.timeline({ easing: "spring(1, 80, 10, 0)", duration: 1000, }); tl.add({ targets: ".hero-text", translateY: [50, 0], opacity: [0, 1], delay: anime.stagger(100), }).add( { targets: ".hero-image", scale: [0.9, 1], opacity: [0, 1] }, "-=800", );
Motion and Compatibility
- Scope: Use motion when it serves the product brief and user task. Respect the existing design system; simple transitions and static states are valid choices.
- Staggering: Leverage
anime.stagger()extensively to add organic rhythm to multiple elements. - Performance: Monitor main thread usage; use
will-change: transform, opacitywhere appropriate for GPU acceleration.
Example
User request:
Create complex, multi-stage landing page orchestrations.
Limitations
- The code above uses the v3 API. Anime.js v4 uses imported
createTimeline()and a different target/parameter signature; do not mix major-version examples. Consult official timeline documentation for the installed version. - Respect
prefers-reduced-motion: provide a static final state, avoid scroll hijacking, and keep focus/keyboard interactions immediately usable. Dispose animations when their component unmounts. will-changeis a temporary optimization hint, not a guarantee of GPU acceleration; measure real frames and avoid leaving it on every element.- Use this skill only when the task clearly matches the scope described above.
- Do not treat the output as a substitute for environment-specific validation, testing, or expert review.
- Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.
常见问题
什么是 stagger(错落效果)?
这是一种让多个元素一个接一个地出现或移动的效果,每两个元素之间有短暂的延迟,从而形成一种视觉节奏。
什么是缓动函数(easing functions)?
它们用来控制动画随时间变化的速度,让动作更自然、不那么生硬,就像现实世界中的运动一样。
可以在任何网站上使用吗?
可以,但它最适合用在那些能真正提升设计和用户体验的精致动画上,不太适合简单的动画。
详情
作者的原始描述
Advanced JavaScript animation library skill for creating complex, high-performance web animations.
热度
- GitHub 星标
- 48k
- 排名
- #3750
- 许可证
- MIT
- 更新时间
- 2026/10/15
评论
- …
同一仓库的更多技能
00-andruia-consultant
48k帮你的智能体启动或改进 AI 项目。它可以分析代码、推荐工具,并用西班牙语制定行动计划。
007
48k让你的智能体执行安全审计和威胁建模。它有助于保护项目免受攻击和漏洞的威胁。
10-andruia-skill-smith
48k帮你的智能体创建或改进 AI 工具。它可以定义工具的工作方式、编写文档,并验证其结构。
20-andruia-niche-intelligence
48k让你的智能体创建某个特定行业的摘要。它有助于借助可靠的信息来源,了解项目的背景、规则、使用模式和风险。