Lottie Fab

A floating action button that morphs open — Lottie JSON. A Lottie (JSON) animation — portable motion that plays identically on web and app via lottie-web. Honors prefers-reduced-motion (don't autoplay). Reserve Lottie for motion that earns its ~160KB runtime.

Nexu Updated

File contents

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

  1. Include lottie.min.js (runtime) and animation.json.
  2. 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).

nexu-io/motion-anything/tree/main/recipes/lottie/lottie-fab commit 2b6f1cb757

Frequently asked questions

npx skillmds@latest add nexu-io/lottie-fab