
Research
/Security News
Weaponizing Discord for Command and Control Across npm, PyPI, and RubyGems.org
Socket researchers uncover how threat actors weaponize Discord across the npm, PyPI, and RubyGems ecosystems to exfiltrate sensitive data.
lottie-animation
Advanced tools
LottieAnimation
is a lightweight and straightforward React component for adding beautiful animations using Lottie files in your web project.
Install the package via npm:
npm install lottie-animation
or with yarn:
yarn add lottie-animation
Make sure you have react
and prop-types
installed in your project as they are peer dependencies of this component.
Import the LottieAnimation
component in your React application and use it as follows:
import React from 'react';
import LottieAnimation from 'lottie-animation';
const MyComponent = () => {
const onComplete = () => {
console.log('Animation completed!');
};
return (
<LottieAnimation
animationPath="path-to-your-lottie.json"
loop={true}
autoplay={true}
style={{ width: 200, height: 200 }}
className="my-custom-class"
onComplete={onComplete}
/>
);
};
export default MyComponent;
The following props are available to customize the LottieAnimation
:
Prop | Type | Default | Description |
---|---|---|---|
animationPath | string | Required. The path to the Lottie JSON file. | |
loop | boolean | true | Determines if the animation should loop. |
autoplay | boolean | true | Determines if the animation should start automatically. |
style | object | Inline styles for the animation container. | |
className | string | CSS class for the animation container. | |
onComplete | function | Callback function when the animation completes. |
Contributions are always welcome!
Distributed under the MIT License. See LICENSE
for more information.
FAQs
A React component for Lottie animations
The npm package lottie-animation receives a total of 22 weekly downloads. As such, lottie-animation popularity was classified as not popular.
We found that lottie-animation demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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 how threat actors weaponize Discord across the npm, PyPI, and RubyGems ecosystems to exfiltrate sensitive data.
Security News
Socket now integrates with Bun 1.3’s Security Scanner API to block risky packages at install time and enforce your organization’s policies in local dev and CI.
Research
The Socket Threat Research Team is tracking weekly intrusions into the npm registry that follow a repeatable adversarial playbook used by North Korean state-sponsored actors.