geosigno

Parallax Image

Component

About

Parallax effect on any img tag or next/image, powered by simpleParallax.js. The image moves with the scroll and catches up smoothly. Settings: orientation, scale, delay, easing (smooth, spring, bounce), overflow, maxTransition.

Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Parallax Image to your project and fits it to your theme.

Code

How Parallax Image is used: the demo's code. The component's own source comes with a free account.

Usage.tsx

import { ParallaxImage } from "@/components/ui/parallax-image"

const images = [
  { src: "https://cdn.21st.dev/assets/mirror/27/2728014f390b8cf2f1a49d4a22877944d8b2285f5ce05e50d2288590625969ac.jpg", orientation: "up" },
  { src: "https://cdn.21st.dev/assets/mirror/cc/ccfc7e8d4dbeef193c7d670881043ddf570c18e438bfc4e30dbe253ced51d025.jpg", orientation: "down" },
] as const

export default function ParallaxImageDemo() {
  return (
    <div className="flex flex-col gap-24 px-6 py-[60vh]">
      {images.map((image) => (
        <div key={image.src} className="mx-auto w-full max-w-3xl overflow-hidden rounded-2xl">
          <ParallaxImage
            src={image.src}
            alt=""
            orientation={image.orientation}
            className="block h-auto w-full"
          />
        </div>
      ))}
    </div>
  )
}

Dependencies