Agent Skills
› nexu-io/motion-anything
› lottie-fab
lottie-fab
GitHub基于Lottie JSON的可变形浮动操作按钮,支持Web与App端一致动画。需引入运行时,遵循无障碍规范,仅在CSS无法实现时谨慎使用以节省性能。
触发场景
需要跨平台一致的微交互动画
图标或控件的复杂形态变换
After Effects导出的JSON动画集成
安装
npx skills add nexu-io/motion-anything --skill lottie-fab -g -y
SKILL.md
Frontmatter
{
"od": {
"mode": "prototype",
"preview": {
"type": "html"
},
"surface": "web",
"category": "animation-motion",
"platform": "desktop",
"upstream": "https:\/\/github.com\/spemer\/lottie-animations-json",
"design_system": {
"requires": false
},
"example_prompt": "Use lottie-fab: load animation.json with lottie-web on the button, loop it, and guard\nprefers-reduced-motion (autoplay:false)."
},
"name": "lottie-fab",
"triggers": [
"lottie",
"fab",
"悬浮按钮"
],
"description": "A floating action button that morphs open — Lottie JSON. A Lottie (JSON) animation — portable motion that plays identically on web and app via\nlottie-web. Honors prefers-reduced-motion (don't autoplay). Reserve Lottie for motion that earns\nits ~160KB runtime.\n"
}
Lottie · FAB
A floating action button that morphs open — Lottie JSON. Lottie JSON from spemer/lottie-animations-json
(MIT). Part of motion-anything; obeys MOTION-SPEC.md.
When to use it
- Portable JSON motion identical on web & app; icon/control micro-animations (incl. After Effects / Jitter exports).
When NOT to use it (restraint)
- When a pure-CSS effect would do — don't ship the Lottie runtime for a simple fade.
How to apply
- Include
lottie.min.js(runtime) andanimation.json. lottie.loadAnimation({ container, renderer:'svg', loop:true, autoplay:false, path:'animation.json' }); start on intent / guard reduced-motion.
Accessibility & performance
prefers-reduced-motion: don't autoplay. SVG renderer; motion-as-JSON (portable, AI-readable).
版本历史
- b016900 当前 2026-07-11 17:06


