Draped Print Gallery with a WebGL Scroll Arch
Overview
A pinned photo gallery for React and Next.js. Photos printed on paper rise in a slanted masonry stream as you scroll and drape over a hidden arch on the way, lifting toward you, catching the light and casting soft shadows, and the arch swells when you scroll fast.
The section pins and its photos rise through it in a slanted masonry stream, each one going to the shortest column so the stream stays even whatever their shapes. Under them lies a hidden arch, a ridge along the top of an ellipse wider than the screen, and every print is a finely divided sheet that lies on it: crossing the ridge it lifts toward a perspective camera and bunches up along the climb, because it keeps its length on the slope instead of swelling like a lens. Its shade and a soft sheen come from the ridge's slope, and its shadow on the background grows lighter and blurrier the higher it lifts.
Details
- Category
- Gallery
- Interaction
- On Scroll + On Hover + On Click
- Trigger
- On Scroll
- Languages
- React, TypeScript, Tailwind
(01)Keep exploring
All 150 componentsBuilt with the same techniques
No. 153 / Gallery
Riptide Image Wave Reveal with WebGL Refraction
On Load · On Scroll · Mouse Move · On Click
No. 017 / Gallery
GSAP Scroll Unfolding Card Wheel Portfolio
On Scroll · On Hover · On Click · Mouse Move · On Load
No. 015 / Gallery
GSAP CSS 3D Folio Card Fan Portfolio
On Scroll · Drag · On Hover · Mouse Move
(02)FAQ
Draped Print Gallery with a WebGL Scroll Arch — FAQ
01What does it need from my page?
Nothing to install, and Tailwind CSS v4. Pass your fonts as the CSS variables --dp-serif and --dp-mono, the way the example does with next/font: they're used for the labels and printed onto the paper. The photos must be same-origin or served with CORS.
02How long does the section pin?
As long as it takes every print to pass, worked out from the number of photos, their shapes and the screen. speed makes it shorter or longer, startFill decides how much of the screen is covered when it pins, and endFill how much is still covered when it lets go.
03Can I change the arch?
crestHeight sets how far prints lift, crestWidth how broad the ridge is, swell how much it rises while scrolling fast, and slant which way and how far the stream leans.
04What happens on a phone?
On a portrait screen the stream becomes one column of prints that fill most of the width, and the arch scales down with the screen. Touch scrolling drives it as usual.
05What happens with reduced motion?
The stream follows the scroll exactly, with no glide and no swell. Without WebGL the prints show as a plain grid.