Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
@crello/react-lottie
Advanced tools
React/Typescript wrapper for awesome Airbnb's [lottie-web](https://github.com/airbnb/lottie-web) lib.
React/Typescript wrapper for awesome Airbnb's lottie-web lib.
https://crello.github.io/react-lottie/
you can find demo files in ./examples
folder -- launch with yarn start
yarn add @crello/react-lottie
or npm install --save @crello/react-lottie
Most basic react-lottie example:
import React from 'react';
import { Lottie } from '@crello/react-lottie'
import animationData from './myAwesomeAnimation.json'
export const BasicLottieComponent = () => <Lottie config={{animationData: animationData}}>
Lottie component creates <div>
and passes it to lottie config as the container
param. This div contains renderer's output of choosen type: 'svg'| 'html' | 'canvas'
. <Lottie>
accepts style
and className
props that will apply to the container
.
Any browser events should be added on elements wrapping actual <Lottie>
e.g.:
<div onClick={..}>
<Lottie/>
<div>
{
height?: string - valid css value e.g. '100px' [default: `100%`],
width?: string - valid css value e.g. '100px' [default: `100%`],
playingState?: 'playing' | 'stopped' | 'paused' [default: `playing`],
segments?: AnimationSegment | AnimationSegment[],
speed?: number - animation playback speed [default: `1`],
style?: styles passed to lottie container,
direction?: AnimationDirection - [default: `1`],
lottieEventListeners?: ReactLottieEvent[] - see available events in AnimationEventName from 'lottie-web',
config: ReactLottieConfig - config with mandatory `path` or `animationData`,
}
{
animationData: any - an Object with the exported animation data,
path: string - remote data,
renderer?: 'svg' | 'canvas' | 'html' - choose renderer [default: `svg`],
loop?: boolean | number - loop boolean or count [default: `false`],
autoplay?: boolean - it will start playing as soon as it is ready [default: `true`],
name?: string - animation name for future reference,
rendererSettings?: SVGRendererConfig | CanvasRendererConfig | HTMLRendererConfig,
}
See more details in @crello/react-lottie exports: Lottie
, ReactLottieConfig
, ReactLottieOwnProps
, ReactLottiePlayingState
Also check out the types provided by lottie-web
itself: AnimationDirection
, AnimationSegment
, AnimationEventName
, AnimationEventCallback
, AnimationItem
, BaseRendererConfig
, SVGRendererConfig
, CanvasRendererConfig
, HTMLRendererConfig
, AnimationConfig
, AnimationConfigWithPath
, AnimationConfigWithData
, Lottie
More lottie animations you can find on lottiefiles
MIT
FAQs
React/Typescript wrapper for awesome Airbnb's [lottie-web](https://github.com/airbnb/lottie-web) lib.
The npm package @crello/react-lottie receives a total of 6,377 weekly downloads. As such, @crello/react-lottie popularity was classified as popular.
We found that @crello/react-lottie demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
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.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.