Tunnel
Neon rings or corridor frames rushing toward you down a winding tunnel, drawn on canvas with soft halos.
New in 1.7.
Lap one starts at 19:00 UTC
Overdrive season four adds six night tracks and rain that pools in the corners. Free on PC and Deck this weekend.
Installation
npx shadcn@latest add https://neonkit.heyaadi.com/r/tunnel.jsonUsage
import { Tunnel } from "@/components/ui/tunnel"
<section className="relative overflow-hidden bg-[#05060a]">
<Tunnel />
<h1 className="relative">Lap one starts at 19:00 UTC</h1>
</section>Examples
Corridor
shape="square" draws frames in the box's proportions, joined at the corners.
Straight and slow
curve={0} keeps the far end centered; a low speed and intensity let it sit behind an error page.
Colors and shapes
Set color per tunnel. White reads as a cold, clinical light.
API reference
Two canvases that fill the nearest positioned parent: soft halos at half resolution and crisp tubes at the device ratio. Accepts native div attributes.
| Prop | Type | Default |
|---|---|---|
color | NeonColorTube color. Brighter gates burn whiter. | inherited |
shape | "circle"Round rings, or rectangular frames shaped like a corridor. | "circle" |
rings | numberRings in view at once. | 22 |
curve | numberHow far the tunnel winds, 0 (straight) to 1. | 0.5 |
speed | numberSpeed multiplier. 0 holds still. | 1 |
intensity | numberBrightness of the tubes, 0 to 1. | 0.85 |
Accessibility
- Decorative: rendered with aria-hidden and pointer-events: none.
- The camera follows the tunnel's own heading, so only the curvature ahead shows and the nearest rings stay centered.
- It pauses offscreen and in hidden tabs, and draws one still frame under prefers-reduced-motion.