New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@lottiefiles/dotlottie-web

Package Overview
Dependencies
Maintainers
4
Versions
92
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@lottiefiles/dotlottie-web

Lottie and DotLottie player for the web

  • 0.0.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
4
Weekly downloads
 
Created
Source

@lottiefiles/dotlottie-web

A javascript library for rendering lottie and dotLottie animations in the browser.

Note: This package is currently in beta and the apis are subject to change.

Table of Contents

Installation

npm install @lottiefiles/dotlottie-web

Usage

<canvas id="my-canvas"></canvas>
import { DotLottie } from '@lottiefiles/dotlottie-web';

const dotLottie = new DotLottie({
    autoplay: true,
    loop: true,
    canvas: document.getElementById('my-canvas'),
    src: "path/to/animation.json",
});

Options

OptionTypeDefaultDescription
autoplaybooleanfalseWhether to start playing the animation immediately
loopbooleanfalseWhether to loop the animation
canvasHTMLCanvasElementnullThe canvas element to render the animation to
srcstringnullThe path to the animation file

Methods

MethodDescription
play()Play the animation
pause()Pause the animation
stop()Stop the animation

Development

Setup

pnpm install

Run Dev Server

pnpm dev

Build

pnpm build

Build WASM (optional)

Note: This step is necessary only if you wish to update the src/renderer.cpp file or the thorvg version being used. If not, you can skip this step.

Using Docker (Recommended):

pnpm build:wasm:docker

Using Emscripten SDK:

Make sure you have the Emscripten SDK installed.

pnpm build:wasm /path/to/emsdk/

Keywords

FAQs

Package last updated on 30 Oct 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc