Fly Through Stack
Images stacked in depth that you fly through: scroll or drag to travel, far images fade in from the background, and the nearest one follows the pointer.
pixikit.com/docs/components/fly-through-stack
Customize
Infinite
Item width340
Aspect ratio0.80
Border radius7
Grayscale1.00
Perspective1000
Spacing800
Spread0.80
Scatter0.10
Reveal range1.5
Pass range1.0
Parallax x0.12
Parallax y0.06
Parallax smooth0.85
Tilt4.0
Pulse0.030
Drift0.08
Smooth0.85
Wheel speed1.0
Drag speed1.5
Auto scroll0
Pause on hover
Background color
Props
27| Name | Type | Default | Description |
|---|---|---|---|
images | FlyThroughStackImage[] | DEFAULT_IMAGES | The images, nearest first: URLs, or objects with src and alt. |
infinite | boolean | true | Loops the stack so it can be scrolled forever in either direction. |
itemWidth | number | 340 | Width of each image, in pixels. |
aspectRatio | number | 0.8 | Image width divided by height. |
borderRadius | number | 7 | Corner rounding, in pixels. |
grayscale | number | 1 | How grey the images are. 0 keeps their color. |
perspective | number | 1000 | CSS perspective, in pixels. Lower values exaggerate the depth. |
spacing | number | 800 | Depth in pixels between consecutive images. Also the scroll distance per image. |
spread | number | 0.8 | How far images sit to the left and right of the centre. |
scatter | number | 0.1 | Random offset added to each image's place. |
revealRange | number | 1.5 | How many images ahead fade into view. |
passRange | number | 1 | How far past the viewer an image travels before it is gone. |
parallaxX | number | 0.12 | How far the focused image follows the pointer sideways, as a fraction of its width. |
parallaxY | number | 0.06 | How far the focused image follows the pointer vertically, as a fraction of its height. |
parallaxSmooth | number | 0.85 | Pointer follow damping. 0 snaps, 1 trails far behind. |
tilt | number | 4 | Degrees the focused image tilts toward the pointer while scrolling fast. |
pulse | number | 0.03 | How much the focused image swells while scrolling fast. 0.03 is 3 percent. |
drift | number | 0.08 | How far the stack drifts against the scroll direction, as a fraction of image height. |
smooth | number | 0.85 | Scroll follow damping. 0 is instant, 1 is very loose. |
wheelSpeed | number | 1 | Multiplier applied to wheel and trackpad deltas. |
dragSpeed | number | 1.5 | Multiplier applied to pointer drag deltas. |
autoScroll | number | 0 | Pixels per second the stack travels on its own; negative flies backward. |
pauseOnHover | boolean | true | Stops the travel while the pointer is over the gallery. |
backgroundColor | string | "transparent" | Color behind the stack; far images fade into it. |
onIndexChange | (index: number) => void | None | Called when the nearest image changes. |
className | string | None | |
children | ReactNode | None | Content laid over the centre of the gallery. |