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

Définition

La définition TypeScript de l'interface telle que trouvée dans le code source d'origam. Cliquez sur l'icône de copie pour copier l'extrait.

typescript

Héritage

Hérite de

Interfaces parentes dont celle-ci hérite. Leurs propriétés sont disponibles pour tout consommateur de cette interface.

API

Propriétés

Chaque propriété déclarée par cette interface, avec son type, son caractère optionnel et sa valeur par défaut.

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.

Écosystème

Utilisé par

Composants et composables qui étendent ou consomment cette interface.

Usage

Exemples

Extraits de code prêts à coller utilisant cette interface.

Using IParallaxProps for a multi-layer parallax

typescript