
Scroll Stack
Scroll
A scroll-driven gallery where images slide through a centred frame, tilting and scaling as they pass, to create depth for editorial, fashion, photography, and visual campaign pages.
Depth before explanation: Parallax Gallery is how atmosphere starts before a word is read.
Use Parallax Gallery when visual atmosphere matters more than step-by-step explanation. Editorial teams, fashion brands, photography studios, and image-led campaigns benefit most because the effect makes a collection feel curated rather than arranged. The page job is atmosphere: visitors should sense depth and pace before they begin comparing images.
In production, the risk is scroll length and loading. The section is 100vh of scroll per image with a sticky full-screen stage that snaps to each slide, and the six images are hard-coded in the source and loaded eagerly, each one twice (main slide and thumbnail).
import ParallaxGallery from '@/components/effects/parallax-gallery' const page = () => { return ( <> <ParallaxGallery /> </> )} export default pageA photography studio relaunching its portfolio page: Parallax Gallery pins a dashed centre frame on screen and moves images one by one through it as the visitor scrolls, each tilting and scaling as it passes, while thumbnail rails on either side show the previous and upcoming shots and a counter tracks progress. The outcome is atmosphere: visitors browse longer before deciding whether to make contact.
Not for ecommerce catalogues, image-heavy archives, or pages where speed-to-grid matters more than atmosphere.
Not for pages where image loading speed is the primary conversion variable - every image loads eagerly, once in the frame and again in the thumbnail rails.
Scroll progress drives transforms only (translate on the slide strip and thumbnail rails, rotate and scale on each slide), and the ScrollTrigger is killed on unmount. Images use next/image with fill and sizes="100vw" but load eagerly, so compress them; if the page uses Lenis smooth scroll, the component pauses it while a snap runs.
Slides sit in DOM order and the counter shows the current position, but each image's alt text is a generic id ("slide-0"), so replace it with real descriptions in the source. Below 640px the same pinned slider runs with a smaller 280 by 340px frame and smaller thumbnails; there is no stacked fallback.
| Prop | Type | Default | Description |
|---|---|---|---|
bgColor | color | #111111 | Background color of the gallery section. |
borderColor | color | rgba(255, 255, 255, 0.5) | Color of the dashed border around the center frame. |
rotationDeg | number | 6 | Max rotation (degrees) applied to off-center slides as they scroll past. |
offscreenScale | number | 1.2 | Scale applied to off-center slides relative to the centered one. |
frameScale | number | 1 | Multiplier on the center frame's width/height. |
The defaults (6 degrees of rotation and a 1.2 scale on off-centre slides) read well on phones, where the frame shrinks to 280 by 340px. Pushing rotationDeg or offscreenScale much higher makes slides look distorted inside the small frame, so test any changes at narrow widths.
No. The frame, slides and thumbnails have fixed pixel sizes and the images fill them with object-cover, so nothing moves as media arrives. The stage fades in once the viewport has been measured, to avoid flashing desktop sizing on mobile.
The component loads every image eagerly through next/image with sizes="100vw", in both the frame and the thumbnail rails, so the main lever is the files themselves: keep the set small and serve compressed assets from a host configured for next/image. If you need lazy loading, change the loading attribute in the source.
Below 640px it keeps the same pinned, snapping slider with a smaller frame (280 by 340px), smaller thumbnails and a smaller counter. With reduced motion the gallery still slides with scroll; only the tilt and scale drop to 25% of their normal strength.
Yes, when atmosphere should precede the spec sheet: editorial, fashion and lifestyle product pages benefit from moving one shot at a time through the frame. It is a poor fit where shoppers need to compare items, since only one image is large at a time. Use it for the hero or story section, then hand off to a static grid for the catalogue.
Need a custom effect? Tell us what to create.