PARALLAX_ELEMENT_TYPE

enum
Animation & Motion

TypeScript enum for the CSS transform type applied to each Parallax element — scale, translate, rotate, depth, or custom.

TypeScript

Definition

The TypeScript definition as found in the origam source. Click the copy icon to copy the snippet.

typescript

Members

Members

All members of this enum. Click a value to copy it to clipboard.

PARALLAX_ELEMENT_TYPE.SCALE
Applies a uniform scale transform on both axes.
PARALLAX_ELEMENT_TYPE.SCALE_X
Applies a horizontal scale transform (scaleX).
PARALLAX_ELEMENT_TYPE.SCALE_Y
Applies a vertical scale transform (scaleY).
PARALLAX_ELEMENT_TYPE.TRANSLATE
Applies a translate transform — moves the element along the scroll axis.
PARALLAX_ELEMENT_TYPE.ROTATE
Applies a rotation transform driven by scroll/motion progress.
PARALLAX_ELEMENT_TYPE.DEPTH
Simulates depth — combines translateZ and scale to produce a 3-D perspective shift.
PARALLAX_ELEMENT_TYPE.DEPTH_INV
Inverted depth — element appears to recede as the user scrolls forward.
PARALLAX_ELEMENT_TYPE.CUSTOM
Custom transform — consumer provides a transform function via the element config.

Ecosystem

Used by

Components and props that accept this enum as a value.

Usage

Examples

Ready-to-paste code snippets using this enum.

Using the enum in script setup

typescript