DO

Dotlottie React

@lottiefiles/dotlottie-react

React wrapper around the dotlottie-web library

Animation
dotlottie
lottie
player
animation
web
canvas
javascript
react
thorvg
@lottiefiles/dotlottie-react
Stars
869
Weekly
1.2M
Open issues
30
Bundle
~25 kB

Installation

npm install @lottiefiles/dotlottie-react

Code example

import { motion } from "@lottiefiles/dotlottie-react";

export function Example() {
  return (
    <motion.div
      initial={{ opacity: 0, y: 12 }}
      animate={{ opacity: 1, y: 0 }}
      transition={{ duration: 0.35 }}
    >
      <h2>Animated with Dotlottie React</h2>
    </motion.div>
  );
}

Pros & cons

Pros

  • Actively maintained by LottieFiles
  • 1.2M weekly downloads. Battle tested
  • First-class TypeScript definitions
  • MIT licensed

Considerations

  • Adds roughly ~25 kB to your bundle
  • Needs client-only rendering in SSR frameworks
  • Not supported in React Native
  • 30 open issues on GitHub

FAQs

Alternatives & similar libraries