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.7 to 0.1.0

2

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

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

@@ -54,2 +54,22 @@ ## lottie-player Web Component

You may set and load animations programatically as well.
```html
<lottie-player
autoplay
controls
loop
mode="normal"
style="width: 320px"
>
</lottie-player>
```
```js
const player = document.querySelector('lottie-player');
player.load('https://assets3.lottiefiles.com/packages/lf20_UJNc2t.json');
// or load via a Bodymovin JSON string/object
player.load('{"v":"5.3.4","fr":30,"ip":0,"op":38,"w":315,"h":600,"nm":"new", ... }');
```
## Properties

@@ -83,3 +103,18 @@

### `load(src: string | object) => void`
Load (and play) a given Bodymovin animation.
#### Parameters
| Name | Type | Description |
| ------- | -------- | ----------------- |
| `src` | `string` or `object` | URL, or a JSON string or object representing a Bodymovin JSON. |
#### Returns
Type: `void`
### `pause() => void`

@@ -199,2 +234,19 @@

## Events
The following events are exposed and can be listened to via `addEventListener` calls.
| Name | Description |
| ----------- | ----------------- |
| `load` | Animation data is loaded. |
| `error` | An animation source cannot be parsed or fails to load. |
| `ready` | Animation data is loaded and player is ready. |
| `play` | Animation starts playing. |
| `pause` | Animation is paused. |
| `stop` | Animation is stopped. |
| `freeze` | Animation is paused. |
| `loop` | An animation loop is completed. |
| `complete` | Animation is complete (all loops completed). |
| `frame` | A new frame is entered. |
## Styling

@@ -201,0 +253,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