IParallaxLayerProps
interface
Parallax
TypeScript
Definition
The TypeScript interface definition as found in the origam source. Click the copy icon to copy the snippet.
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.
- speednumber
- 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.
- offsetXnumber
- Static X-axis offset (px) applied on top of the parallax translation. Useful to nudge a layer without changing its speed.
- offsetYnumber
- Static Y-axis offset (px) applied on top of the parallax translation.
- zIndexnumber
- Optional `z-index` override. By default layers stack in document order.