183

Helix Photo Gallery

£7
or the whole Vault, £99

A scroll-driven 3D photo gallery that winds about fifty photographs round a tall spiral: scrolling pins it and turns the tower so each photo climbs round to the front, a fast scroll stretches the coil, drag spins it with momentum, and the front photo opens large in place.

ScrollTrigger Lenis advanced
12 more details
3d-transformspinningscrubdragtouch-dragmomentumvelocity-reactivepointer-tiltlightboxkeyboard-navigationreduced-motionprogressive-enhancement

Released

About this effect

A tall spiral of photographs, wound like the treads of a spiral staircase seen from outside. Several turns are in view at once and in real perspective, with each photo a clear step up from the one before and a fine rail tracing the spiral underneath: the photos on the near side face you, the ones round the back are seen from behind, smaller and evenly dimmed, through clean gaps between the photos, and the coil dissolves into the dark above and below.

Read the full effect overview

Scroll, and the gallery pins and winds. The tower turns and rises together, so photographs climb up past the front one after another, exactly as fast as you scroll, stopping when you stop and reversing with you. Scroll hard and the turns pull apart and the photos lean back with the speed; let go and the coil springs closed, then eases so one photograph sits dead centre. Drag sideways, with a mouse or a finger, and the tower spins with momentum before settling on the nearest photo, and the pointer tips the whole tower a little as it moves.

The front photograph's caption and position show in a quiet bar underneath. Click it, tap it or press Enter and it lifts off the spiral and opens flat and large in the same place; close it and it returns to its slot. When the last photo has come round, the pin releases and the page carries on.

Helix Photo Gallery - GSAP animation effect preview

What's included

15 items
  • About fifty photographs on a 3D helix with several turns in view, in real perspective, with correct front-to-back depth as they pass
  • On wide screens the tower opens out across the frame, and the far side shows only through the gaps, never behind the front photo
  • Scroll pins the gallery and one scrubbed value both turns the tower and carries it upward, so photos climb round to the front in order
  • Follows the scrollbar exactly: pauses, reverses and settles with one photograph dead centre
  • Scroll speed pulls the coil apart and leans the photos back, then a spring closes it when you stop
  • Horizontal drag with mouse, finger or trackpad spins the tower with momentum and snaps the nearest photo to the front
  • The pointer tips the tower's axis a little; the photos round the back dim with depth
  • Click, tap or Enter opens the front photo flat and large in place; Escape, a click or a scroll returns it to its slot
  • Portrait and landscape photos keep their own shapes at one consistent height
  • Every photograph is a real link to its full-size file; small thumbnails load first and full-size files only near the front or when opened
  • Arrow keys, Home and End move through the photos, with focus following the front one
  • Narrower spiral with fewer photos per turn on phones; vertical swipes still wind it
  • Turns visible, photos per turn, spread, scroll distance, coil stretch, tilt and viewing angle set from data attributes
  • Reduced motion and no JavaScript both leave a plain, unpinned grid of linked photos with captions
  • Small API (goTo, open, close, refresh, revert) and change, open and close events; several galleries on a page stay independent

Perfect for

4 use cases
  • Wedding, portrait and event photographers who want a portfolio that people scroll through rather than click through
  • Travel, architecture and property sites showing a long set of images as one memorable section
  • Agencies and studios presenting a body of work, a lookbook or a campaign archive
  • Editorial and feature pages that need an immersive photo sequence between sections of text

How it works

2 sections

The gallery is an ordinary list of links: each one points at a full-size photograph and wraps a small thumbnail and a caption. Without JavaScript, or with reduced motion, that list is shown as a grid and nothing else happens.

With JavaScript the photos are placed around a spiral in 3D, each sized to its own shape, and GSAP ScrollTrigger pins the gallery for the length of the scroll. The scroll position becomes one number, the photograph at the front, and every card's position, angle, depth and shading follow from it each frame. Dragging adds to that number and hands it back to the scroll position when it settles, so scrolling and dragging never disagree. The animation only runs while something is moving, and everything the script adds, from the pin to the caption bar and its listeners, is removed again by revert().

Plugins ScrollTrigger
Difficulty Advanced
Smooth scroll Lenis integration
Includes HTML + JS + CSS source, documentation, AI setup prompt, lifetime updates

Lighthouse, as measured

Google Lighthouse on this effect's demo, from the latest scan. A measurement of the demo as shipped, not a promise for your page.

Accessibility
100
Best practices
100

No performance score, on purpose. That figure depends on how you deploy: your server's compression and caching, your CDN, the connection and the device doing the test, none of which the code controls. The same page can score very differently on two consecutive runs, so measure it where it will live.

The Vault opens this source and the whole library.

Each product gives you the HTML, CSS and JavaScript source, the full documentation and an AI setup prompt, licensed for unlimited personal and commercial projects. Every paid product is tested for desktop and mobile layouts, reduced-motion handling, animation cleanup and keyboard controls wherever there is something to operate.

One payment, over 350 products, and future additions to the library.

Documentation

Quick Start

1. Add to your HTML <head>:

In your downloadThe working code for this step, in index.html.

2. Add before the closing </body> tag:

In your downloadThe working code for this step, in index.html.

3. Add the gallery anywhere in your <body>:

In your downloadThe working code for this step, in index.html.

Each link points at the full-size photograph and wraps a small thumbnail of the same shape. The spiral looks its best with 30 to 60 photographs; with fewer, lower data-cards-per-turn so the tower still has several turns.

Using It With Your Own Design

What the effect needs from your markup:

  • A wrapper with data-helix. The script pins this element for the length of the scroll, sizes it to the viewport, and appends the caption bar and the open-photo layer to it.
  • A .helix__list inside it whose <li class="helix__item"> children each hold one .helix__card link. The link's href is the full-size image; its <img> is the thumbnail.
  • Give every <img> real width and height attributes. The script reads each photograph's shape from them, so portraits and landscapes keep their proportions at one shared height.
  • .helix__caption is optional; without it the alt text is used in the bar.
  • The gallery takes the full viewport height while pinned, so give it its own full-width section rather than placing it inside a narrow column.

What is only the demo's styling: the fonts (Instrument Serif for captions, Inter for the count), the colours in :root, the soft gradients above and below the tower (.helix.is-live::before and ::after), the bar's type and the progress marker colour. The grid layout under "The plain gallery" is the fallback and can be restyled freely.

CSS the effect depends on:

  • The rules under .helix.is-live: the wrapper's 100svh height with overflow: clip, the absolutely positioned list, and items centred with left: 50%; top: 50%. The script sets each item's size, margin, transform and stacking order inline.
  • touch-action: pan-y on the live wrapper: vertical swipes still scroll the page while horizontal swipes spin the tower.
  • The pre-hide block under @media (prefers-reduced-motion: no-preference) keeps the list hidden for the instant before the spiral is built, so the grid never flashes. It is gated on .has-js, which the script removes if GSAP fails to load.
  • .helix__viewer[hidden] { display: none } and the .helix__shade overlay.

Options

Set these on the data-helix element.

Attribute Values Default Description
data-turns-visible Number 2.8 How many turns of the spiral fill the height of the screen. Higher gives smaller photos and more turns
data-turns-visible-narrow Number 4 The same, below 640px wide
data-cards-per-turn Number 10 How many photographs make one turn. Fewer gives a steeper, more visible step from each photo to the next
data-cards-per-turn-narrow Number 7 The same, below 640px wide
data-spread 0.1 to 0.48 0.28 How far the tower opens out across a wide frame, as a share of its width from the centre. Photos are spaced evenly round it, with clean gaps to see the far side through. Ignored below 640px wide
data-scroll-distance Number 10 Scroll length of the whole gallery, in screen heights
data-coil-stretch 0 and up 1 How far a fast scroll or fling pulls the turns apart and leans the photos. 0 turns it off
data-tilt Degrees 6 How far the pointer tips the tower's axis. 0 turns it off
data-view-angle Degrees 10 How far above the tower you look from, halved below 640px wide. 0 is level; negative looks up from below
data-cue Text Scroll to wind, drag to spin The short hint in the bar. An empty value hides it

The tower is sized to fit the frame: if the turns would run off the sides, the photos shrink until they fit. Photos dissolve before they reach the top edge or the caption bar, and a photo on the far side that would sit directly behind the front one fades out, so the front photo always has a clean outline.

Accessibility

  • Links stay links. Every photograph is a real link to its full-size file, named by its alt text and caption. Ctrl, Cmd or Shift-click opens the file as normal.
  • Keyboard. The gallery is one tab stop, on the front photograph. Arrow keys move to the next or previous photo, Home and End jump to either end, and focus follows the photograph at the front. Enter or Space opens it; Escape closes it and returns focus to the photo.
  • The open photograph is a dialog with a labelled close button that receives focus. While it is open the page does not scroll; a scroll, click, tap or Escape closes it.
  • Touch. Vertical swipes scroll the page and wind the tower, horizontal swipes spin it, and a tap brings a photo to the front or opens the one already there.
  • Reduced motion. With prefers-reduced-motion: reduce the script builds nothing: no pin, no spiral and no bar. Visitors get a plain grid of linked photos with captions, and the page scrolls past it normally. Changing the setting while the page is open switches between the two.
  • No JavaScript, or a blocked CDN. The same plain grid of links.
  • Focus. Photos and the close button have visible focus rings.

Photographs

The demo photographs are art-directed derivatives of photos from Pexels, used under the Pexels licence. The original Pexels address of each is the source field in assets/img-manifest.json. Each has a small thumbnail (hNN.webp, 360px tall) and a full-size file (hNN-full.webp). Replace them with your own, keeping each thumbnail and its full-size file the same shape.

Dependencies

Required:

  • GSAP 3.12+ (the demo is built against 3.15.0)
  • ScrollTrigger plugin

Optional:

  • Lenis 1.3.17 for smooth scrolling. The script uses a window.lenis your page already has, starts its own if the library is loaded, and works with native scrolling if it is not. Add data-smooth="off" to <html> to ship without it.

Also in your download: the full source, worked examples, the events and programmatic API, and the class reference.

£7