Skip to content
Backgrounds03 / 118

Depth Gallery

A parallax background made of photos floating at different depths. As you scroll, far images lag behind the page, soft and dim, while near ones sweep past large and sharp. The cursor tilts the whole field and hovering a photo lifts it. A pure background: put your section on top, or anything inside it stays pinned in view.

GSAP ScrollTriggerReal photosCursor tiltLive tweaksReduced-motion safe
Scroll the stageMove to tilt

Tweak

LIVE

Parallax

1.00
1.00

Field

36
7

Look

6.0px
0.55
14px

Props

11 props
  • items(string | { src, alt })[]
    Your images. Repeated to fill the field.
  • childrenReactNode
    Optional content, pinned in the middle of the view while the field scrolls past. Near photos keep clear of it.
  • countnumber
    Number of photos in the field.default 36
  • depthnumber
    Parallax strength: how far the layers travel against each other as you scroll.default 1
  • tiltnumber
    How much the field follows the cursor. 0 turns it off.default 1
  • blurnumber
    Blur of the farthest layer, in px.default 6
  • fognumber
    How much far layers fade into the background, 0 to 1.default 0.55
  • radiusnumber
    Corner radius of the photos, in px.default 14
  • seednumber
    Change it to reshuffle the layout.default 7
  • scrollerElement | null
    Scroll container, if the page does not scroll the window.
  • classNamestring
    Size it. Make it taller than the screen, e.g. h-[220vh] w-full.