
Research
/Security News
Toptal’s GitHub Organization Hijacked: 10 Malicious Packages Published
Threat actors hijacked Toptal’s GitHub org, publishing npm packages with malicious payloads that steal tokens and attempt to wipe victim systems.
react-glitch-image
Advanced tools
# NPM
npm install --save react-glitch-image
# YARN
yarn add react-glitch-image
import { GlitchImage } from "react-glitch-image";
<GlitchImage image="image.jpg"/>
name | default | description |
---|---|---|
width | 20 | If it is a number it will be used as rem, otherwise use string with unit type |
splitSize | 8 | Number of divisions |
animationInterval | 4000 | Time interval to repeat animation (measured in ms) |
animationDuration | 400 | I really have to describe this (measured in ms) |
variations | [2, 3] | Intensity of the effect of each layer |
inside | false | Defines if the effect is seen outside the container |
activeFxOnInterval | true | Activate the glitch effect in the animationInterval |
activeFxOnHover | true | Activate the glitch effect on hover |
position | ||
layerColors | false | Alternate colors in layer 2, better explained below |
opacity | 0.3 | Layer 2 opacity |
filter | true | Activate aleatory hue-rotate filter value and brightness in layer 2 |
brightness | 2 | Brightness filter intensity |
customFilter | null | Deactivate the previous filter for a more personalized filter |
onActiveFx | null | This function is executed when the glitch effect is triggered by the interval, and sends the animationDuration |
baseImageStyleOnActiveFx | null | Apply css style on the base image when fx glitch is activated |
- <GlitchImage image="image.jpg" width={18}/> // =18rem
- <GlitchImage image="image.jpg" width="50%"/> // =50%
- <GlitchImage image="image.jpg" width="300px"/> // =300px
This property receives normal filters for css property,
however, you can specify a random value for each filter.
using $<number>
you can indicate the maximum value that will be generated randomly.
customFilter="invert($20%)"
customFilter=invert($100%) saturate(100%) hue-rotate($200deg) brightness(2)
Every time the filter is activated using activeFxOnInterval, this again generates random values for the customFilter, each layer generate a different random
Receives an array of colors to alternate on each of the layers 2. Uses true
, to set the default color array ["rgba(255,0,0,0.04)", "rgba(0,0,255,0.04)"]
This will create a sublayer of the color specified in layer 2, it is recommended to deactivate filter or use a customFilter to get a better and more personalized result.
EXAMPLE
<GlitchImage
image="image.jpg"
customFilter="invert($20%) saturate($30%)"
layerColors={["rgba(0,0,180,0.05)", "rgba(200,0,0,0.05)"]}
/>
FAQs
show images with glitch fx
The npm package react-glitch-image receives a total of 16 weekly downloads. As such, react-glitch-image popularity was classified as not popular.
We found that react-glitch-image 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
Threat actors hijacked Toptal’s GitHub org, publishing npm packages with malicious payloads that steal tokens and attempt to wipe victim systems.
Research
/Security News
Socket researchers investigate 4 malicious npm and PyPI packages with 56,000+ downloads that install surveillance malware.
Security News
The ongoing npm phishing campaign escalates as attackers hijack the popular 'is' package, embedding malware in multiple versions.