IParallaxLayerProps

interface
Parallax

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.

speed
number
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.
offsetX
number
Static X-axis offset (px) applied on top of the parallax translation. Useful to nudge a layer without changing its speed.
offsetY
number
Static Y-axis offset (px) applied on top of the parallax translation.
zIndex
number
Optional `z-index` override. By default layers stack in document order.