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.
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.
- animationDurationnumber
- Deprecated — use `duration` instead. Kept as a silent alias for backwards compat; a one-shot console warning is emitted when used.
- easingTParallaxEasing | string
- Easing curve. Accepts a TParallaxEasing keyword (linear | ease-out | spring) or any raw CSS timing-function string.
- perspectivenumber
- CSS perspective depth (px) applied to the parallax container for 3D transform effects.
- eventTParallaxEvent
- Event type that drives the parallax — scroll, move (mouse), or similar. Controls which input is read.
- activeboolean
- Freezes the mouse-driven mode when false. Distinct from `disabled` which stops all effects.
- durationnumber
- Transition duration (ms) for the parallax interpolation. Replaces the deprecated `animationDuration`.
- directionTParallaxDirection
- Direction of the parallax effect — "vertical" (translateY), "horizontal" (translateX), or "both" (2D on mouse move).
- speednumber
- Global speed multiplier in single-layer mode. Default 0.5. Equivalent to wrapping slot in a single layer with this speed.
- disabledboolean
- Forces the parallax effect OFF (translate stays at 0). Useful for SSR, snapshot tests or prefers-reduced-motion integrations.
- thresholdnumber
- 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