ReactHive

Cursor Reel

Component 1

About

A reel of full-screen frames that stack as you scroll: each slides up over the last, which drifts back and dims underneath. The title of the frame on screen rides with the pointer, trailing it a little, and hands over to the next title as each frame takes the screen.

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

Code

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

Usage.tsx

"use client";

import { CursorReel } from "@/components/ui/cursor-reel";

const settings = {
  lag: 0.5
};

/* The demo's Google Fonts. In a Next.js app, use next/font/google instead. */
if (typeof document !== "undefined" && !document.getElementById("cursor-reel-fonts")) {
  const style = document.createElement("style");
  style.id = "cursor-reel-fonts";
  style.textContent = "@import url('https://fonts.googleapis.com/css2?family=Inter+Tight:wght@100..900&display=swap'); .rh-inter-tight { font-family: 'Inter Tight', sans-serif; }";
  document.head.appendChild(style);
}

const cinematic = [
  {
    "name": "neon-portrait",
    "title": "Neon",
    "alt": "A woman lit red against teal neon",
    "caption": "Night portrait",
    "width": 2000,
    "height": 1556,
    "src": "https://cdn.21st.dev/assets/mirror/d9/d9e1b344686856488942cfc690391d1573ce3d4f325909133da66ccecd5f6725.webp"
  },
  {
    "name": "dark-portrait",
    "title": "Quiet",
    "alt": "A woman in shadow against black",
    "caption": "Night portrait",
    "width": 2000,
    "height": 1314,
    "src": "https://cdn.21st.dev/assets/mirror/7f/7fd34e327c7b0b94276c5af95852a76769c5563dadacee812c8b15a3b194ebff.webp"
  },
  {
    "name": "night-bus",
    "title": "Night Bus",
    "alt": "Passengers behind a fogged red bus window at night",
    "caption": "Night portrait",
    "width": 2000,
    "height": 1333,
    "src": "https://cdn.21st.dev/assets/mirror/f4/f487417bbff2566ed13e53b39c1d4a811eb02a61b37fda8a0ea1f4c145525076.webp"
  },
  {
    "name": "night-street",
    "title": "Walk Home",
    "alt": "A lone figure walking down a snowy street at night",
    "caption": "Night portrait",
    "width": 2000,
    "height": 1335,
    "src": "https://cdn.21st.dev/assets/mirror/7f/7f2ca8dc68e47405edd5a0376547da48071e3af24a99a35ba7c5056604a2bdc8.webp"
  },
  {
    "name": "blonde-portrait",
    "title": "Corridor",
    "alt": "A woman in a black collar in a pale corridor",
    "caption": "Night portrait",
    "width": 2000,
    "height": 1333,
    "src": "https://cdn.21st.dev/assets/mirror/b3/b377f3fe39cac6b389b57e7cef401f29e29489a1e00aa575f7f9e17c600a603e.webp"
  },
  {
    "name": "red-blue-portrait",
    "title": "Signal",
    "alt": "A man in glasses lit red and blue",
    "caption": "Night portrait",
    "width": 2000,
    "height": 1333,
    "src": "https://cdn.21st.dev/assets/mirror/57/57d07c05d95ac65fd05abeba9bbe70e06c24ace606b464d6f5bc92113f4475bf.webp"
  },
  {
    "name": "bus-portrait",
    "title": "Last Stop",
    "alt": "A woman in amber light on an empty bus",
    "caption": "Night portrait",
    "width": 2000,
    "height": 1125,
    "src": "https://cdn.21st.dev/assets/mirror/d3/d394221393cc0d932f49661ddb29d710d163f6aa3641da31f68577d7a5f00ecb.webp"
  },
  {
    "name": "studio-chair",
    "title": "Studio",
    "alt": "A seated figure among easels in a dark studio",
    "caption": "Night portrait",
    "width": 2000,
    "height": 1323,
    "src": "https://cdn.21st.dev/assets/mirror/c8/c8092060a661e6deb599686264cfddc701ce3ade20af1a1862d82b9af55ea0e7.webp"
  },
  {
    "name": "garage-portrait",
    "title": "Level Two",
    "alt": "A woman under strip lights in a car park",
    "caption": "Night portrait",
    "width": 2000,
    "height": 1125,
    "src": "https://cdn.21st.dev/assets/mirror/1e/1e9375b2c5313f59e7f8af965339526d2e5442b6c3fb1c0ad329a6dd6e25a6fe.webp"
  }
];

const type = { className: "rh-inter-tight", style: { fontFamily: "'Inter Tight', sans-serif" } };

const work = [
  { client: "Northlight", title: "After Hours", tag: "Film" },
  { client: "Hollis", title: "Quiet Rooms", tag: "Campaign" },
  { client: "Route 205", title: "Night Bus", tag: "Film" },
  { client: "Ember Co.", title: "Walk Home", tag: "Title Sequence" },
  { client: "Atelier Vos", title: "Corridor", tag: "Campaign" },
  { client: "Signal", title: "Red Shift", tag: "Music Video" },
];

function DemoContent(props: Partial<typeof settings> = {}) {
  const v = { ...settings, ...props };
  const items = work.map((w, i) => ({ ...w, src: cinematic[[0, 1, 2, 3, 4, 5][i]].src, alt: cinematic[i].alt, href: "#" }));
  return (
    <main className={`${type.className} bg-black text-white`}>
      <header className="flex min-h-[70svh] flex-col justify-end px-[5vw] pb-[10vh]">
        <h1 className="max-w-[14ch] text-[clamp(3rem,8vw,7rem)] leading-[0.92] font-semibold tracking-[-0.045em]">Selected Films.</h1>
        <p className="mt-6 max-w-[24rem] text-[17px] leading-[25px] text-white/65">Scroll through the reel. The title follows your pointer.</p>
      </header>
      <CursorReel items={items} lag={Number(v.lag)} />
      <footer className="flex min-h-[60svh] items-center px-[5vw]">
        <p className="text-[clamp(2rem,5vw,4rem)] leading-none font-semibold tracking-[-0.04em]">That&apos;s a Wrap.</p>
      </footer>
    </main>
  );
}

/** The demo in its own colours, filling the frame. */
export default function Demo(props: Partial<typeof settings> = {}) {
  return (
    <div className="min-h-svh w-full" style={{ background: "#000000" }}>
      <DemoContent {...props} />
    </div>
  );
}

More by ReactHive

View all
  • Card Deal

    Card Deal

    78
  • Step Stack

    Step Stack

    58
  • Arc Gallery

    Arc Gallery

    39
  • Fluid Type

    Fluid Type

    33
  • Card Pack

    Card Pack

    28
  • Satin

    Satin

    19
  • Flap Board

    Flap Board

    9
  • Mercury Clock

    Mercury Clock

    8

Explore more

Part of ReactHive UI — browse the full library on 21st.dev.