Getting Started


dotLottie-wc is a web component that allows you to easily embed Lottie animations in your web applications. It is a wrapper around the dotLottie-web library.


Terminal window
npm install @lottiefiles/dotlottie-wc

Basic Usage

Via npm

After installation, you can use dotlottie-wc in your HTML file:

<dotlottie-wc src="" autoplay="true" loop="true"></dotlottie-wc>

And import it in your JavaScript or TypeScript module:

import '@lottiefiles/dotlottie-wc';


You can also use the component directly via a npm CDN:

<!DOCTYPE html>
<html lang="en">
<meta charset="utf-8" />
<title>@lottiefiles/dotlottie-wc | Basic Example</title>
<dotlottie-wc src="" autoplay loop></dotlottie-wc>
<script type="module" src=""></script>