Dolly Gallery

Images stacked into the distance that the camera dollies through on scroll, each one fading in from the depth and slipping past the lens

Customize

Item Width
340
Aspect Ratio
0.80
Border Radius
7
Grayscale
1.00
Perspective
1000
Spacing
800
Spread
0.80
Scatter
0.10
Reveal Range
1.5
Pass Range
1.0
Parallax X
0.12
Parallax Y
0.06
Parallax Smooth
0.85
Tilt
4.0
Pulse
0.030
Drift
0.08
Smooth
0.85
Wheel Speed
1.0
Drag Speed
1.5
Auto Scroll
0

Props

27
images(string | { src: string; alt?: string })[]

Images stacked into the depth, as URLs or objects with alt text.

Default8 Unsplash photos
infiniteboolean

Loop the stack so it can be scrolled forever in either direction.

Defaulttrue
itemWidthnumber

Maximum width of an image in pixels at the focus depth. Shrinks to fit narrow containers.

Default340
aspectRationumber

Image width divided by height.

Default0.8
borderRadiusnumber

Corner radius of the images in pixels.

Default7
grayscalenumber

How far the images are drained of colour, 0 to 1.

Default1
perspectivenumber

Perspective distance in pixels. Smaller values exaggerate the depth.

Default1000
spacingnumber

Depth in pixels between consecutive images. Also the scroll distance per image.

Default800
spreadnumber

Sideways offset of each image as a fraction of its width, alternating sides.

Default0.8
scatternumber

Vertical scatter of each image as a fraction of its height.

Default0.1
revealRangenumber

Images this many steps deeper than the focus are still faintly visible.

Default1.5
passRangenumber

Images this many steps in front of the focus are still faintly visible.

Default1
parallaxXnumber

How far the focused image follows the pointer sideways, as a fraction of its width.

Default0.12
parallaxYnumber

How far the focused image follows the pointer vertically, as a fraction of its height.

Default0.06
parallaxSmoothnumber

Pointer follow damping. 0 snaps, 1 trails far behind.

Default0.85
tiltnumber

Degrees the focused image tilts towards the pointer while scrolling fast.

Default4
pulsenumber

How much the focused image swells while scrolling fast. 0.03 is 3 percent.

Default0.03
driftnumber

How far the stack drifts against the scroll direction, as a fraction of image height.

Default0.08
smoothnumber

Scroll follow damping. 0 is instant, 1 is very loose.

Default0.85
wheelSpeednumber

Multiplier applied to wheel and trackpad deltas.

Default1
dragSpeednumber

Multiplier applied to pointer drag deltas.

Default1.5
autoScrollnumber

Pixels per second the camera travels by itself. 0 disables.

Default0
pauseOnHoverboolean

Stop the travel while the pointer is over the gallery.

Defaulttrue
backgroundColorstring

Colour behind the images.

Default"transparent"
onIndexChange(index: number) => void

Fired when the image nearest the focus depth changes.

Default—
classNamestring

Extra classes for the outer container.

Default—
childrenReactNode

Content layered above the gallery.

Default—