
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
rgb-split-image
Advanced tools
A highly customizable React component for creating event-driven chromatic aberration effects.
A lightweight React component for adding interactive RGB split (chromatic aberration) effects to images.
⚠️ Epilepsy Warning:
npm install rgb-split-image
import { RGBSplitImage } from "rgb-split-image";
<RGBSplitImage
src="/hero.jpg"
alt="Hero"
idleEffect="breathe"
splitDistance={10}
/>;
Drop it in, pick an effect, and you’re good to go.
| Effect | What it does |
|---|---|
none | No channel split everything stays aligned |
breathe | Subtle, looping sine-wave motion |
followMouse | Channels shift toward the cursor |
glitch | Fast, random displacement each frame |
Effects can run in different states:
| Prop | When it runs |
|---|---|
idleEffect | Default state (always active unless overridden) |
onHover | While hovering the image |
onClick | Once per click, for effectDuration ms |
onMount | Once when the component mounts |
Priority order:
onClick / onMount → onHover → idleEffect
Higher-priority effects temporarily override lower ones.
| Prop | Type | Default | Description |
|---|---|---|---|
src | string | - | Image URL |
alt | string | - | Alt text (required for accessibility) |
idleEffect | RGBEffect | "none" | Default effect |
onHover | RGBEffect | "none" | Effect on hover |
onClick | RGBEffect | "none" | Effect on click |
onMount | RGBEffect | - | Effect on mount |
splitDistance | number | 40 | Max pixel distance channels can separate |
effectDuration | number | 1000 | Duration of temporary effects (ms) |
effectIntensity | number | 1.5 | Multiplier for temporary effects |
breatheSpeed | number | 1.0 | Speed of the breathe animation |
colorSpace | "rgb" | "cmyk" | "rgb" | Color matrix mode |
grayscale | boolean | false | Desaturates the base image |
trackWindowMouse | boolean | false | Track cursor outside the image bounds |
disableOnMobile | boolean | false | Disable effects on viewports ≤ 768px |
as | ElementType | "img" | Render as a custom component (e.g. Next.js Image) |
onImageClick | MouseEventHandler | — | Native click handler |
Some props (like breatheSpeed, effectDuration, effectIntensity, and trackWindowMouse) are conditionally typed.
If you pass them without activating the relevant effect, TypeScript will throw an error. No silent misconfiguration.
<RGBSplitImage
src="/photo.jpg"
idleEffect="breathe"
breatheSpeed={0.75}
onClick="glitch"
effectDuration={400}
effectIntensity={1}
splitDistance={20}
/>
<RGBSplitImage
src="/landscape.jpg"
idleEffect="followMouse"
grayscale
splitDistance={15}
/>
<RGBSplitImage
src="/grid.jpg"
idleEffect="followMouse"
trackWindowMouse
splitDistance={20}
/>
prefers-reduced-motionIntersectionObserver)disableOnMobile to reduce battery usagearia-hidden="true"MIT Jafar Sabaouni
FAQs
A highly customizable React component for creating event-driven chromatic aberration effects.
The npm package rgb-split-image receives a total of 2 weekly downloads. As such, rgb-split-image popularity was classified as not popular.
We found that rgb-split-image demonstrated a healthy version release cadence and project activity because the last version was released less than 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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.