Agent skill Web motion
Lottie Animations
Design, implement or review motion on the web.
Install the skill
Run the command from your project root with Node.js and npm.
npx skills@latest add https://github.com/freshtechbro/claudedesignskills/tree/main/plugins/bundles/animation-components/skills/lottie-animations --skill lottie-animations --agent claude-code --yesCheck this file in your project.claude/skills/lottie-animations/SKILL.md
Other ways to install
Choose an assistant interactively
npx skills@latest add https://github.com/freshtechbro/claudedesignskills/tree/main/plugins/bundles/animation-components/skills/lottie-animations --skill lottie-animationsSelect your assistant and choose the project installation scope.
Official instructions
The tested Skills CLI 1.10.0 requires Node.js 22.20 or later. A web confirmation state, a licensed local .lottie or Lottie JSON file, and a canvas-capable browser. Use the dotLottie Web v0.x API from @lottiefiles/dotlottie-web. Confirm your installed version before adapting player examples from other Lottie packages.
View operation manualWhat this skill helps with
- Design, implement or review motion on the web.
Good for
- Web motion and transitions
- Publisher
- FreshTechBro
- Compatibility
- Use the dotLottie Web v0.x API from @lottiefiles/dotlottie-web. Confirm your installed version before adapting player examples from other Lottie packages.
- Scenario
- Play an optional confirmation animation
- Skill name
lottie-animations- Repository
freshtechbro/claudedesignskills
Common pitfall
Avoid this prompt
Replace the success text with a looping Lottie player.
A missing asset, unavailable player, or motion preference could leave people without an understandable result.
Use these steps
- Identify the real success state and a local asset for optional playback.
- Use the dotLottie Web player with explicit loading and cleanup.
- Test success, missing media, reduced motion, and route teardown.
Hands-on walkthrough
Keep confirmation text independent of a decorative dotLottie canvas and verify playback, failure, and cleanup.
Keep confirmation text independent of a decorative dotLottie canvas and verify playback, failure, and cleanup.
Define the static confirmation
Identify the real success state and a local asset for optional playback.
Prompt · Step 1Use Lottie Animations on [confirmation view]. Identify the real success state and visible confirmation text. Choose a local .lottie or JSON asset and a fixed canvas slot that will avoid layout movement when the animation loads. Record the installed player version, and design a static result for load failure and reduced motion.Load and play the canvas once
Use the dotLottie Web player with explicit loading and cleanup.
Prompt · Step 2After the confirmation mounts, create DotLottie from @lottiefiles/dotlottie-web with the actual canvas, src, autoplay: false, and loop: false. Register load and loadError listeners. On load, play once if the success state is current and motion is allowed. Leave confirmation text visible and the canvas decorative. Remove listeners and call destroy() on unmount.Check asset errors and remount
Test success, missing media, reduced motion, and route teardown.
- One normal play finishes and the motion is optional.
- The success text survives missing assets and a remount.
Prompt · Step 3Verify the normal animation plays once and stops. In a local test intercept the animation request with a missing-file response and confirm the text remains visible and usable. Repeat with reduced motion and leave during playback, then remount and check for stale events. Report what happened and any cases that could not run.
Workflow lookup
Use the documented calls with the version selected for the walkthrough.
Load a local asset on a canvasAPI
- Command or reference
new DotLottie({ canvas, src, autoplay: false, loop: false })- Examples
- Use the browser-mounted canvas and a URL served by the app.
Handle load and cleanupAPI
- Command or reference
load · loadError · destroy()- Examples
- Start playback after load when appropriate and release the player on unmount.
FAQ
Do I need a .lottie archive rather than JSON?
The dotLottie Web canvas player accepts both .lottie and compatible Lottie JSON files. Verify the exact exported asset on the target browser.
Where are the skill materials?
Open the project skill folder printed by the installer for SKILL.md and any bundled resources. The app’s runtime libraries are managed separately in its own package manifest.