Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
react-sparkle
Advanced tools
Make your React app more :sparkles:sparkly:sparkles:
Install: yarn add react-sparkle
or npm install react-sparkle
Add Sparkle
as a child of the element you want to add sparkles to. Important: the parent element must have either relative
or absolute
positioning.
import React from 'react'
import Sparkle from 'react-sparkle'
const SparklyThing = () => (
// Note: the parent of Sparkle must be positioned relatively or absolutely
<div style={{ position: 'relative' }}>
<Sparkle />
</div>
)
All props are optional. These are the defaults:
<Sparkle
// The color of the sparkles. Can be a color, an array of colors,
// or 'random' (which will randomly pick from all hex colors).
color={'#FFF'}
// The number of sparkles to render. A large number could slow
// down the page.
count={50}
// The minimum and maximum diameter of sparkles, in pixels.
minSize={5}
maxSize={8}
// The number of pixels the sparkles should extend beyond the
// bounds of the parent element.
overflowPx={20}
// How quickly sparkles disappear; in other words, how quickly
// new sparkles are created. Should be between 0 and 1000,
// with 0 never fading sparkles out and 1000 immediately
// removing sparkles. Most meaningful speeds are between
// 0 and 150.
fadeOutSpeed={50}
// Whether we should create an entirely new sparkle when one
// fades out. If false, we'll just reset the opacity, keeping
// all other attributes of the sparkle the same.
newSparkleOnFadeOut={true}
// Whether sparkles should have a "flickering" effect.
flicker={true}
// How quickly the "flickering" should happen.
// One of: 'slowest', 'slower', 'slow', 'normal', 'fast', 'faster', 'fastest'
flickerSpeed={'normal'}
/>
Sparkle
.This code was inspired by and based on jQuery Canvas Sparkles.
FAQs
A React component to increase the number of sparkles in your app
We found that react-sparkle 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.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.