Skip to content
ReactHive

Kaleido Tunnel

An endless flight down a turning tunnel of square frames, its walls scattered with rings, hearts and blobs and lit through arched windows, rolling as it goes and smeared by motion blur at speed. Move the pointer to steer, scroll to change speed, and press and hold to warp.

BackgroundsInspired by LusionNo packages, just React and Tailwind CSS
Kaleido TunnelBackgrounds

How It Works

One triangle covers the section and a fragment shader draws everything. Each pixel's ray is followed through the tunnel a segment at a time: turned into that segment's frame, it either meets a wall, worked out exactly, or carries on into the next; where the next segment's turned square doesn't cover it, it hits that segment's front face, which is where the nested frames come from. Decals and windows are signed distance shapes placed by a hash of the segment's number, which wraps without a seam, so the flight never ends. For motion blur each pixel traces eight moments of the flight and averages them.

Use It

Install it with shadcn, or copy the file into your components folder, then use it like this. Change a setting in the demo and the example picks it up. Works with Next.js (App Router) and any React 19 project on Tailwind CSS v4.

npx shadcn@latest add @reacthive/kaleido-tunnel
Example
<KaleidoTunnel className="h-svh" tint="#2027f2">
  <h1>Further In, Every Frame.</h1>
</KaleidoTunnel>
  • It's a section: give it a height (h-svh for a full-screen hero) and put your content inside as children; it sits over the tunnel.
  • tint colours everything: the walls, the decals and the light at the far end are all drawn from it. twist turns each segment from the last, in degrees (0 is a straight corridor); speed is the cruise, in segments a second; blur sets how much the flight smears.
  • The wheel speeds it up or sends it backwards for a moment, without stopping the page from scrolling. Holding the pointer down builds up to warp and lets go gently. With reduced motion it drifts slowly, without blur or roll.
  • Plain WebGL2, no packages and no pictures: one file. It pauses while it's off screen. Without WebGL the section shows its tint.

Kaleido Tunnel, Answered.

Free to use, what it needs and where it came from.

Your Next Site Starts with a Live Demo.

Click around first. What you see is exactly what you download.

Start a Project

Tell us what you're making. A few lines is plenty; we'll ask the rest on a call.

What do you need?
Rough budget (optional)

Or email projects@reacthive.dev