Parallax
Media
stable
Scroll-driven parallax effect for images and layers.
API
Props
All props accepted by this component, with their type, default value and description.
- animationDurationnumber
- easingTParallaxEasing | string'linear'
- Easing curve for the parallax animation. Accepts tokens or any CSS timing function.
- perspectivenumber1000
- CSS perspective depth value for the 3D transform context.
- eventTParallaxEvent'move'
- Driving event for the parallax effect: mouse move, scroll, or audio data.
- activebooleantrue
- Activates or freezes the mouse-driven movement mode.
- durationnumber1000
- Animation duration in milliseconds for the legacy mouse/transition path.
- directionTParallaxDirection'vertical'
- Axis of the parallax effect. Both enables 2D mouse tracking.
- speednumber0.5
- Global speed multiplier for single-layer mode (0 = fixed, 1 = scroll speed, >1 = faster).
- disabledbooleanfalse
- Forces the parallax translation to 0 regardless of scroll or events.
- thresholdnumber0
- Proportion (0–1) of the host that must enter the viewport before the effect activates.
- idstring
- classstring | Array<string> | object
- stylestring | Array<string> | object | StyleValue
- tagstring'div'
- Root HTML element tag.
- colorTColor
- Text color applied to the parallax root.
- bgColorTColor
- Background color applied to the parallax root.
- paddingboolean | number | string
- paddingTopboolean | number | string
- paddingLeftboolean | number | string
- paddingBottomboolean | number | string
- paddingRightboolean | number | string
- paddingBlockboolean | number | string
- paddingInlineboolean | number | string
- paddingInlineStartboolean | number | string
- paddingInlineEndboolean | number | string
- paddingBlockStartboolean | number | string
- paddingBlockEndboolean | number | string
- marginboolean | number | string
- marginTopboolean | number | string
- marginLeftboolean | number | string
- marginBottomboolean | number | string
- marginRightboolean | number | string
- marginBlockboolean | number | string
- marginInlineboolean | number | string
- marginInlineStartboolean | number | string
- marginInlineEndboolean | number | string
- marginBlockStartboolean | number | string
- marginBlockEndboolean | number | string
- borderboolean | number | string | TDirectionBoth | Array<TDirectionBoth>
- borderTopboolean | number | string
- borderLeftboolean | number | string
- borderBottomboolean | number | string
- borderRightboolean | number | string
- borderBlockboolean | number | string
- borderInlineboolean | number | string
- borderInlineStartboolean | number | string
- borderInlineEndboolean | number | string
- borderBlockStartboolean | number | string
- borderBlockEndboolean | number | string
- borderColorstring
- borderStylestring
- borderTopColorTColor
- borderRightColorTColor
- borderBottomColorTColor
- borderLeftColorTColor
- borderInlineStartColorTColor
- borderInlineEndColorTColor
- borderBlockStartColorTColor
- borderBlockEndColorTColor
- roundedboolean | number | string | TRounded | null | undefined
- roundedTopRightboolean | number | string
- roundedTopLeftboolean | number | string
- roundedBottomLeftboolean | number | string
- roundedBottomRightboolean | number | string
- roundedStartStartboolean | number | string
- roundedStartEndboolean | number | string
- roundedEndStartboolean | number | string
- roundedEndEndboolean | number | string
- elevationTElevation
- heightnumber | string
- Height of the parallax container.
- maxHeightnumber | string
- maxWidthnumber | string
- minHeightnumber | string
- minWidthnumber | string
- widthnumber | string
- Width of the parallax container.
- audiostring
- playAudioboolean
API
Slots
Content slots exposed by this component.
- #default
- Content rendered inside the parallax container. Add ParallaxLayer or ParallaxElement children here.
API
Emits
Events emitted by this component.
- @entervoid
- Fired when the mouse enters the parallax area (move mode).
- @leavevoid
- Fired when the mouse leaves the parallax area (move mode).
- @scroll-progressnumber
- Fired on scroll with the normalised progress value (0–1).
Interactive
Playground
Edit props live and see the component update in real time. The generated code snippet updates as you change values.
Rendering the live preview…
Usage
Examples
Ready-to-paste code snippets for your templates.
Scroll-driven parallax
Mouse-driven parallax
Single-layer (speed prop)
Ecosystem
Family
Components from the same folder that share conventions and often compose together.