IParallaxLayerProps

interface
Parallax

TypeScript

Definition

The TypeScript interface definition as found in the origam source. Click the copy icon to copy the snippet.

typescript

Inheritance

Extends

Parent interfaces this one inherits from. Their properties are available on every consumer of this interface.

API

Properties

Every property declared by this interface, with its type, optionality and default.

speed
number
Parallax speed multiplier for this layer. - `0` → fixed (no movement, sticks to host) - `0.5` → half the scroll speed (background — far) - `1` → moves with the scroll (neutral) - `>1` → faster than the scroll (foreground — near) Negative values reverse the direction.
offsetX
number
Static X-axis offset (px) applied on top of the parallax translation. Useful to nudge a layer without changing its speed.
offsetY
number
Static Y-axis offset (px) applied on top of the parallax translation.
zIndex
number
Optional `z-index` override. By default layers stack in document order.