Command Palette

Search for a command to run...

Installation

Learn how to install the dotlottie-js library using npm, pnpm, or yarn for your browser and Node.js projects.

Installing dotlottie-js

Integrate dotlottie-js into your project using your preferred package manager (npm, pnpm, or yarn).

Using a Package Manager

Choose the command that suits your project's setup:

pnpm

pnpm add @dotlottie/dotlottie-js

npm

npm install @dotlottie/dotlottie-js

yarn

yarn add @dotlottie/dotlottie-js

Environments: Browser and Node.js

dotlottie-js is designed to be isomorphic, meaning it runs in both browser and Node.js environments. Import it directly into your JavaScript/TypeScript modules.

import { DotLottie } from "@dotlottie/dotlottie-js";

// Your browser-specific code here
const dotlottie = new DotLottie();
// ...

Verifying Installation

After installation, you can verify that the library is correctly integrated by trying a simple import and instantiation in your project code as shown in the examples above.

Once installed, you're ready to start creating and manipulating .lottie files!

Next up: Quick Start: Creating a dotLottie file

Last updated: April 10, 2026 at 9:12 AMEdit this page