Back to projects

Reactive Image

#open-source#npm#react

An open-source React component that turns static hero visuals into animated, theme-aware canvases.

Overview

Reactive Image is an npm package I authored to give React and Next.js teams a drop-in way to animate otherwise static images. You wrap any <img>, next/image, or canvas element with <ReactiveImage> and the library layers glare, parallax, particle noise, and spotlight animations on top--no After Effects exports required. Because it ships as an ES module with automatic tree shaking, the same component can live in a landing page hero, a CMS-powered gallery, or a marketing email embed without bloating bundles.

Why I built it

Most portfolio sites crave motion but end up shipping looping MP4s or Lottie files that crush performance metrics. I wanted a simpler alternative: let developers attach tasteful motion to any asset they already store in a CMS or CDN. The library exposes variants such as float, tilt, pulse, and noise, plus composable layers (gradients, blur, cursor-following hotspots) so designers can remix animations with just props instead of timelines.

Library Design

import ReactiveImage from "reactive-image";
import Image from "next/image";

export function Hero() {
  return (
    <ReactiveImage
      as={Image}
      src="/images/ankara.jpg"
      width={1200}
      height={800}
      variant="tilt"
      glare
      reduceMotionFallback="fade"
    />
  );
}

Features

Adoption

The package has been installed over 500 times and powers hero sections on my site, agency landing pages, and a few product dashboards. Community feedback led me to add Next.js app/-compatible lazy loading, TypeScript generics for custom variants, and reduced-motion fallbacks, while GitHub discussions continue to steer upcoming additions like background video blending.