IParallaxLayerProvide
interface
Parallax
Provide context exposed by the enriched OrigamParallax to its `<OrigamParallaxLayer>` children. Distinct from the legacy `IParallaxProvide` consumed by `<OrigamParallaxElement>` (kept separate to avoid coupling the two APIs).
TypeScript
Definition
The TypeScript interface definition as found in the origam source. Click the copy icon to copy the snippet.
API
Properties
Every property declared by this interface, with its type, optionality and default.
- directionrequiredRef<TParallaxDirection>
- easingrequiredRef<TParallaxEasing | string>
- disabledrequiredRef<boolean>
- progressrequiredRef<number>
- Live scroll progress, normalised to `[0, 1]`. `0` = host just entered the viewport, `1` = host just left.
- mouseRatiorequiredRef<{ x: number, y: number }>
- Live mouse-ratio for `direction="both"` on `event="move"` — `{ x: 0..1, y: 0..1 }`. Falls back to `{ x: 0.5, y: 0.5 }` when no mouse data is available.
- cssScrollDrivenrequiredRef<boolean>
- Whether the runtime is using the CSS scroll-driven path (true) or the JS rAF fallback (false). Layers may opt out of the JS work when the CSS path is active.
- reducedMotionrequiredRef<boolean>
- Whether `prefers-reduced-motion: reduce` is honoured — layers MUST stay at offset 0 when this is true.
- registerrequired(layer: IParallaxLayerRegistry) => void
- Register / unregister a layer with the parent. The parent reads the registry to compute and apply per-layer transforms each frame.
- unregisterrequired(id: symbol) => void
- updaterequired(id: symbol, patch: Pick<IParallaxLayerRegistry, 'speed' | 'offsetX' | 'offsetY'>) => void