Platform
VaultVault
  • Free15
  • Navigation19
  • Buttons9
  • Scroll55
  • Text27
  • Sliders & marquees19
  • Gallery & images67
  • Cursor24
  • Page transitions10
  • Loaders2
  • Backgrounds10
  • UI components33
ButtonsPart of ProButtons
IconsPart of ProIcons
  • Interface Essentials144
  • Social Icons69
  • Payment Badges41
SavedPart of ProSaved
Support
DocumentationDocumentation
MCP serverMCP server
SettingsSettings
VaultGallery & imagesPhoto Stack Gallery
Drag Parallax SliderBrowse all 182Pile to Spread Cards
  • Free15
  • Navigation19
  • Buttons9
  • Scroll55
  • Text27
  • Sliders & marquees19
  • Gallery & images67
  • Cursor24
  • Page transitions10
  • Loaders2
  • Backgrounds10
  • UI components33
  • Interface Essentials144
  • Social Icons69
  • Payment Badges41
Sign inSign in

Start free. The code for 15 components, no card needed.

Get 15 free

Photo Stack Gallery

This one is locked. Become a member to open the code for it and the rest of the Vault.

See plansTry the 15 free ones

What you'll need.

Install

  • gsap
  • MotionPathPlugin
  • CustomEase

Setup

npm i gsapregisterPlugin(MotionPathPlugin, CustomEase)

More like this

  • Card
  • Stagger

Features.

  • A neat pile of photos in the middle of the stage, each one behind stepping up a little
  • Click it and every photo bows along its own curve into a strip down one side while the front one grows into a big frame on the other
  • The strip fills from the bottom up, 0.035s apart, with the frame photo landing last
  • Click a strip photo to swap it into the frame; the old one drops into the slot it left
  • Arrow keys step through the photos; Escape, the close button or a click on bare stage folds it back, last-viewed photo on top
  • A rolling 01 / 06 counter, a caption that rolls with each photo, and optional masked copy lines that rise in
  • Any move can interrupt another: every photo always heads home from wherever it is
  • Strip side, move time and curve depth are options
  • Respects prefers-reduced-motion: every move runs 20× faster
  • GSAP with MotionPathPlugin and CustomEase

How to get it right.

Use portrait photos

Every photo is shown at 4:5, from a 100px strip photo up to a 640px frame. Export them around 1000px wide so the frame stays sharp.

Five to eight photos

The strip splits the stage height between every photo but the one in the frame. Under four the strip looks sparse; past eight each strip photo gets small (they stop shrinking at 56px tall).

Name each photo

The caption reads data-phs-name on each image, or its alt when there's no name. Keep names short: the caption doesn't wrap.

Adding copy

It ships with the caption only. To add copy, put .phs_title, .phs_meta or .phs_desc with data-phs-line, each in a .phs_mask, above the caption in [data-phs-copy], or pass title, meta and description in React. The copy block sits in the middle of the stage, above the photos. On narrow screens the frame slides under it, and at 767px and below the description hides. A title, one meta line and two lines of description fit best.

Variations.

  • Default — strip on the left, 0.55s moves, curve 0.45
  • Mirrored — data-au-side="right": strip on the right, frame on the left
  • Straight lines — data-au-curve="0"
  • Slow unfold — data-au-duration="1"
  • Your colours — override the --phs-* variables; --phs-margin and --phs-margin-x move the strip and frame in from the edges

Where it fits.

  • Illustration and photo portfolios — one project's set, opened on demand
  • Field notes and journals — a pile of prints that lays itself out
  • Product details — a stack of shots beside a short description
  • Case studies — the gallery section between two blocks of text

Frequently asked.

Not built in. Call .click() on the first [data-phs-photo] from your own code, for example when the section scrolls into view.

The strip photos shrink at 479px and below, the margins halve at 767px, and the frame fills the room left beside the strip: at least 220px wide, unless that would make it taller than 68% of the stage. The copy sits over the frame there.

Yes. Every photo is a button: Tab to the pile and press Enter to open it, then use the arrow keys, and Escape to close. Focus returns to the pile's top photo.

Yes. Every stage runs on its own.

Yes: gsap, MotionPathPlugin and CustomEase, loaded before the script.

Related components.

Pro

File Drawer Cards

Hover

Pro

Capsule Image Hero

Click

Pro

Depth Fly-Through Hero

Load