Built for Motion
Log in

Draped Print Gallery with a WebGL Scroll Arch

proOn ScrollOn HoverOn Click
Loading preview

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 components

Built with the same techniques

(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.