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.

animationDuration
number
easing
TParallaxEasing | string
'linear'
Easing curve for the parallax animation. Accepts tokens or any CSS timing function.
perspective
number
1000
CSS perspective depth value for the 3D transform context.
event
TParallaxEvent
'move'
Driving event for the parallax effect: mouse move, scroll, or audio data.
active
boolean
true
Activates or freezes the mouse-driven movement mode.
duration
number
1000
Animation duration in milliseconds for the legacy mouse/transition path.
direction
TParallaxDirection
'vertical'
Axis of the parallax effect. Both enables 2D mouse tracking.
speed
number
0.5
Global speed multiplier for single-layer mode (0 = fixed, 1 = scroll speed, >1 = faster).
disabled
boolean
false
Forces the parallax translation to 0 regardless of scroll or events.
threshold
number
0
Proportion (0–1) of the host that must enter the viewport before the effect activates.
id
string
class
string | Array<string> | object
style
string | Array<string> | object | StyleValue
tag
string
'div'
Root HTML element tag.
color
TColor
Text color applied to the parallax root.
bgColor
TColor
Background color applied to the parallax root.
padding
boolean | number | string
paddingTop
boolean | number | string
paddingLeft
boolean | number | string
paddingBottom
boolean | number | string
paddingRight
boolean | number | string
paddingBlock
boolean | number | string
paddingInline
boolean | number | string
paddingInlineStart
boolean | number | string
paddingInlineEnd
boolean | number | string
paddingBlockStart
boolean | number | string
paddingBlockEnd
boolean | number | string
margin
boolean | number | string
marginTop
boolean | number | string
marginLeft
boolean | number | string
marginBottom
boolean | number | string
marginRight
boolean | number | string
marginBlock
boolean | number | string
marginInline
boolean | number | string
marginInlineStart
boolean | number | string
marginInlineEnd
boolean | number | string
marginBlockStart
boolean | number | string
marginBlockEnd
boolean | number | string
border
boolean | number | string | TDirectionBoth | Array<TDirectionBoth>
borderTop
boolean | number | string
borderLeft
boolean | number | string
borderBottom
boolean | number | string
borderRight
boolean | number | string
borderBlock
boolean | number | string
borderInline
boolean | number | string
borderInlineStart
boolean | number | string
borderInlineEnd
boolean | number | string
borderBlockStart
boolean | number | string
borderBlockEnd
boolean | number | string
borderColor
string
borderStyle
string
borderTopColor
TColor
borderRightColor
TColor
borderBottomColor
TColor
borderLeftColor
TColor
borderInlineStartColor
TColor
borderInlineEndColor
TColor
borderBlockStartColor
TColor
borderBlockEndColor
TColor
rounded
boolean | number | string | TRounded | null | undefined
roundedTopRight
boolean | number | string
roundedTopLeft
boolean | number | string
roundedBottomLeft
boolean | number | string
roundedBottomRight
boolean | number | string
roundedStartStart
boolean | number | string
roundedStartEnd
boolean | number | string
roundedEndStart
boolean | number | string
roundedEndEnd
boolean | number | string
elevation
TElevation
height
number | string
Height of the parallax container.
maxHeight
number | string
maxWidth
number | string
minHeight
number | string
minWidth
number | string
width
number | string
Width of the parallax container.
audio
string
playAudio
boolean

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.

@enter
void
Fired when the mouse enters the parallax area (move mode).
@leave
void
Fired when the mouse leaves the parallax area (move mode).
@scroll-progress
number
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

vue

Mouse-driven parallax

vue

Single-layer (speed prop)

vue

Ecosystem

Family

Components from the same folder that share conventions and often compose together.