PRO

Shader Tunnel Slider

Cards flying at you down a CSS perspective corridor, over a raymarch-style tunnel drawn by a fragment shader. The backdrop is a single full-screen plane whose polar pattern is sin(angle / 0.1) times sin(20 / radius + t), which is what produces the ribbed funnel, and scroll is fed in as a separate uniform on top of elapsed time so scrolling accelerates the tunnel rather than only moving the cards. Each card starts far down the Z axis, alternates to the left or right of centre, and is pushed forward across the whole scroll while its opacity ramps only over the final step, so it fades up out of the dark instead of popping in. Three.js, GSAP ScrollTrigger, and Lenis.

Component

Watch Showreel

Launching 2024

Neon

BLK30128

Volt

BLK39102

Echo

BLK84729

Glitch

BLK67215

Pulse

BLK48391

Drift

BLK55204

Prism

BLK71638

Vapor

BLK29457

Signal

BLK83016

Static

BLK40972

Install
npx shadcn@latest add https://ui.aryank.space/r/shader-tunnel-slider.json

Installs from ui.aryank.space. To add it by hand, copy the files in Usage below, or register the @compronents namespace via the docs.

Files

API
PropTypeDefaultDescription
slidesTunnelSlide[]10 BLANK cardsTitle, id, and image. Travel distance is derived from the count, so adding cards lengthens the corridor rather than crowding it.
zStepnumber2500Spacing between cards, and also the window over which a card fades up.
embeddedbooleantrueOwn the scroll container. Set false to drive it from the window scroll.
Customize
brandtext

Wordmark in the centre of the nav.

zSteptext

World units between two cards on the Z axis.

Dependencies
threegsaplenis