Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@lottiefiles/lottie-player

Package Overview
Dependencies
Maintainers
2
Versions
62
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@lottiefiles/lottie-player - npm Package Compare versions

Comparing version 0.0.4 to 0.0.5

2

package.json
{
"name": "@lottiefiles/lottie-player",
"version": "0.0.4",
"version": "0.0.5",
"description": "Lottie animation player web component.",

@@ -5,0 +5,0 @@ "main": "dist/lottie-player.js",

@@ -1,20 +0,30 @@

# lottie-player Web Component
## lottie-player Web Component
This is a Web Component for easily embedding Lottie animations in websites.
This is a Web Component for easily embedding and playing Lottie animations in websites.
[![Published on npm](https://img.shields.io/npm/v/@lottiefiles/lottie-player.svg)](https://www.npmjs.com/package/@lottiefiles/lottie-player)
[![Published on webcomponents.org](https://img.shields.io/badge/webcomponents.org-published-blue.svg)](https://www.webcomponents.org/element/@lottiefiles/lottie-player)
[![npm](https://img.shields.io/npm/v/@lottiefiles/lottie-player.svg)](https://www.npmjs.com/package/@lottiefiles/lottie-player)
[![webcomponents.org](https://img.shields.io/badge/webcomponents.org-published-blue.svg)](https://www.webcomponents.org/element/@lottiefiles/lottie-player)
## Demo
![screencast](https://i.imgur.com/miLzIkJ.gif)
View editable examples on [CodeSandBox](https://codesandbox.io/s/y2nxyvomyj)
## Installation
* In HTML:
#### In HTML, import from CDN or from the local Installation:
Import element from a CDN.
- Import from CDN.
```html
<script src="https://unpkg.com/@lottiefiles/lottie-player@0.0.4/dist/lottie-player.js"></script>
<script src="https://unpkg.com/@lottiefiles/lottie-player@0.0.5/dist/lottie-player.js"></script>
```
* In Javascript or TypeScript:
- Import from local node_modules directory.
```html
<script src="/node_modules/@lottiefiles/lottie-player/dist/lottie-player.js"></script>
```
Install package using npm or yarn.
#### In Javascript or TypeScript:
1. Install package using npm or yarn.
```shell

@@ -24,9 +34,9 @@ npm install --save @lottiefiles/lottie-player

Import package in your code.
2. Import package in your code.
```javascript
import '@lottiefiles/lottie-player/lottie-player.js';
import '@lottiefiles/lottie-player';
```
## Usage
Add the element `lottie-player` and set the `src` property to a URL pointing to a valid Bodymovin JSON.
```html

@@ -44,5 +54,2 @@ <lottie-player

## Examples
- View editable examples on [CodeSandBox](https://codesandbox.io/s/y2nxyvomyj)
## Properties

@@ -154,3 +161,21 @@

### `seek(frame: number) => void`
Seek to a given frame.
#### Returns
Type: `void`
### `snapshot(download?: boolean) => string`
Snapshot the current frame as SVG.
If 'download' argument is boolean true, then a download is triggered in browser.
#### Returns
Type: `string`
### `toggleLooping() => void`

@@ -157,0 +182,0 @@

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

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