IParallaxProps

interface
Motion & Parallax

Full props contract for <OrigamParallax>. Extends common component, color, spacing, border, dimension and audio contracts, plus parallax-specific controls for easing, speed, direction, event type and threshold.

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.

animationDuration
number
Deprecated — use `duration` instead. Kept as a silent alias for backwards compat; a one-shot console warning is emitted when used.
easing
TParallaxEasing | string
Easing curve. Accepts a TParallaxEasing keyword (linear | ease-out | spring) or any raw CSS timing-function string.
perspective
number
CSS perspective depth (px) applied to the parallax container for 3D transform effects.
event
TParallaxEvent
Event type that drives the parallax — scroll, move (mouse), or similar. Controls which input is read.
active
boolean
Freezes the mouse-driven mode when false. Distinct from `disabled` which stops all effects.
duration
number
Transition duration (ms) for the parallax interpolation. Replaces the deprecated `animationDuration`.
direction
TParallaxDirection
Direction of the parallax effect — "vertical" (translateY), "horizontal" (translateX), or "both" (2D on mouse move).
speed
number
Global speed multiplier in single-layer mode. Default 0.5. Equivalent to wrapping slot in a single layer with this speed.
disabled
boolean
Forces the parallax effect OFF (translate stays at 0). Useful for SSR, snapshot tests or prefers-reduced-motion integrations.
threshold
number
Proportion (0→1) of host visible in viewport before the effect activates. 0 = starts immediately at viewport edge, 0.3 = waits until 30% visible.

Ecosystem

Used by

Components and composables that extend or consume this interface.

Usage

Examples

Ready-to-paste code snippets using this interface.

Using IParallaxProps for a multi-layer parallax

typescript