Socket
Book a DemoInstallSign in
Socket

@sentinel-one/lottie

Package Overview
Dependencies
Maintainers
7
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sentinel-one/lottie

Lottie Animation Component

0.1.2
latest
Source
npmnpm
Version published
Maintainers
7
Created
Source

Lottie Animation Component

npm version License

Lottie Animation Wrapper Component for Angular 7 or higher.

(Originally forked from: fivethree-team/lottie)

📦 Installation

TBD as ng add soon

npm i @sentinel-one/lottie lottie-web --save

🔨 Usage

Import the module into your root application module:

import { NgModule } from '@angular/core';
import { LottieModule } from '@sentinel-one/lottie';

@NgModule({
    imports: [
        LottieModule
    ]
})
export class AppModule {}

🦁 Animation

Add the lottie component to your template:

<fiv-lottie [params]="lottieParams" [width]="250" [height]="250" (animationCreated)=onAnimationCreated($event)></fiv-lottie>

You need to setup the lottieParams in your component:

import { Component } from '@angular/core';
import { LottieAnimation, LottieParams } from '@sentinel-one/lottie';

Component({
  selector: 'app-home',
  templateUrl: 'home.page.html',
  styleUrls: ['home.page.scss'],
})
export class HomePage {

  lottieParams: LottieParams = {
    path: 'assets/lottie/empty_box.json',
    renderer: 'canvas',
    loop: true
  };

  onAnimationCreated(animation: LottieAnimation) {
    animation.play();
    animation.setSpeed(0.8);
  }
}

Save your lottie files in the assets folder and change the path param, this way they are copied when building your application.

Keywords

lottie

FAQs

Package last updated on 14 Jul 2019

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

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.