198

Liquid Wipe Scenes

£7
or the whole Vault, £99

Pinned full-screen scenes of photos and video that rise over one another behind a liquid edge: a spring-point surface that swells with scroll speed, sloshes waves across on a flick, troughs when you scroll back and settles flat as each scene lands.

ScrollTrigger Lenis intermediate
10 more details
scrubpinningclip-pathvelocity-reactivespring-physicswave-simulationparallaxvideo-playbacklenisprogressive-enhancement

Released

About this effect

A pinned, full-viewport sequence of photographs and short films. Scroll, and each scene rises over the one before behind a leading edge that behaves like the surface of a liquid. The edge is a live simulation, a chain of spring points across the screen, each pulled to its rest line and coupled to its neighbours, so waves travel along it and bounce off its ends. A slow scroll lifts a gentle swell. A flick sends waves sloshing sideways, cresting off-centre and never quite the same twice. Scrolling back sends a trough. As each scene lands, the surface ripples down and settles flat.

Read the full effect overview

The scene underneath responds too. It sinks to about 90 percent, drifts with parallax and darkens, its corners rounding as it goes, while the incoming picture starts offset inside its clip and settles. A thin sand-coloured line rides just inside the crest. Each scene's caption, an index numeral, a title and a credit line, lifts in with the edge one line after another, and a compact counter rolls from 01 to 05.

The whole sequence is scrubbed to the scroll position, so it plays in both directions every time, and the surface keeps settling for a moment after the scroll stops. Videos play only while their scene is on screen. The markup is one container and a child per scene around an img, picture or video. The demo is a five-scene editorial series of coast and weather: two films and three photographs, in an Instrument Serif display face on a dark ground.

Liquid Wipe Scenes - GSAP animation effect preview

What's included

13 items
  • A liquid leading edge on every wipe: 24 to 40 spring points simulated at a fixed timestep with substeps, drawn as a smooth Catmull-Rom curve in clip-path: path()
  • Waves that travel along the edge and reflect off its ends, seeded off-centre with per-point variation so a flick never looks symmetrical
  • Speed-aware surface: a slow scroll lifts a gentle swell, a flick sends waves sloshing across, a reversal sends a trough
  • Settles flat as each scene lands, and keeps rippling for a moment after the scroll stops while the wipe itself stays scrubbed
  • Hard clamp on depth, so the surface never leaves the band you set, and troughs never expose the ground behind the sinking scene
  • Tension, damping and wave energy as attributes, from glassy and fast to slow and rolling or calm and heavy
  • Optional crest line riding just inside the edge, coloured by one CSS custom property
  • The outgoing scene sinks, drifts with parallax, darkens and rounds its corners; the incoming picture counter-parallaxes and settles inside its clip
  • Captions ride in with the edge, each line on its own delay, plus an optional rolling counter (01 / 05) and a --liquid-progress custom property
  • Videos play muted and inline only while their scene is on screen or rising into view, and the next film preloads while the scene before it is showing
  • Vertical (up) or horizontal (left) wipes; standard Lenis wiring built in, borrowing a host Lenis instead of replacing it
  • Reduced motion, no JavaScript and a blocked CDN all get stacked full-screen frames with posters; switching motion preference keeps the visitor on the same scene
  • refresh() rebuilds after markup changes and revert() removes every pin, trigger, generated node and inline style

Perfect for

5 use cases
  • Photography and travel portfolios that present a series as one continuous sequence
  • Editorial features and long reads with full-bleed chapter openers
  • Architecture, hospitality and property sites walking a visitor through spaces
  • Product launches and brand stories mixing film loops and stills
  • Festival, exhibition and event sites introducing artists or venues one screen at a time

How it works

3 sections

The container is pinned with ScrollTrigger for one viewport of scroll per scene, and scroll progress is scrubbed into a single position through the sequence. Every frame, the script works out which scene is landing and which is rising, and clips the rising one to the region behind its leading edge.

That edge is a row of points, each with a position and a velocity. A spring pulls every point towards a rest line, a second spring pulls it towards its neighbours, and damping bleeds energy away; that neighbour coupling is what makes waves run sideways and reflect off the ends. The simulation advances in fixed small steps, so it behaves the same at any frame rate. The rest line carries a swell that grows with scroll speed, and every change of speed kicks the points, mostly around a spot that wanders along the edge, so flicks and reversals make waves rather than a uniform shift. Near both ends of each wipe the surface is calmed and drawn flat, and every point is clamped to the depth you set.

The points are joined into a smooth curve and written as a clip-path, rebuilt from the stage's current size. The crest line is the thin band between that curve and the same curve one and a half pixels further in. A has-js class added in the head sets up the stage before first paint, and is removed if GSAP or ScrollTrigger fail to load. Under reduced motion the scenes stay as stacked static frames.

Plugins ScrollTrigger
Difficulty Intermediate
Smooth scroll Lenis integration
Includes HTML + JS + CSS source, documentation, AI setup prompt, lifetime updates

Lighthouse, as measured

Google Lighthouse on this effect's demo, from the latest scan. A measurement of the demo as shipped, not a promise for your page.

Accessibility
100
Best practices
100

No performance score, on purpose. That figure depends on how you deploy: your server's compression and caching, your CDN, the connection and the device doing the test, none of which the code controls. The same page can score very differently on two consecutive runs, so measure it where it will live.

The Vault opens this source and the whole library.

Each product gives you the HTML, CSS and JavaScript source, the full documentation and an AI setup prompt, licensed for unlimited personal and commercial projects. Every paid product is tested for desktop and mobile layouts, reduced-motion handling, animation cleanup and keyboard controls wherever there is something to operate.

One payment, over 350 products, and future additions to the library.

Documentation

Quick Start

1. Add to your HTML <head>:

In your downloadThe working code for this step, in index.html.

2. Add before the closing </body> tag:

In your downloadThe working code for this step, in index.html.

3. Add one container with a child per scene:

In your downloadThe working code for this step, in index.html.

The script starts itself. Put the container wherever the sequence belongs on your page: it pins when its top reaches the top of the viewport and releases after the last scene lands.

Using It With Your Own Design

What the effect needs from your markup: one element with data-liquid-scenes, and inside it two or more data-liquid-scene elements, each wrapping one <img>, <picture> or <video> that fills it. The script reads only these data- hooks, never class names. Inside a scene, data-liquid-caption is optional: each of its direct children is lifted in with the wipe, one after another, so their order sets the stagger. Inside the container, an empty data-liquid-counter element is optional; the script fills it with the current scene number (which rolls with the wipe) and the total, and empties it again on teardown. Anything else you put inside a scene (a link, a button, a logo) is clipped and carried with it.

What is only the demo's styling: the Instrument Serif and Instrument Sans type, the dark ground and sand accent, the legibility scrims (.scene::after), the caption layout and the counter pill. The crest line's colour is the demo's --liquid-line value on the container (sand); set your own, or turn the line off with data-liquid-line="off". The cue pill (.scenes__cue) and its CSS text are demo-only too, and so is the Lenis line in step 2 if you do not want smooth scrolling.

CSS the effect depends on: the three blocks marked EFFECT CONTRACT at the top of style.css:

In your downloadThe working code for this step, in style.css.

Keep the stage free of transform and filter on its ancestors (they break position: fixed pinning), and do not give scenes their own clip-path or transform: the script owns both while the sequence is live. The stage background shows around a sinking scene, so set it to suit your page.

Options

Set these as attributes on the data-liquid-scenes container. Each container reads its own, so two sequences on one page can differ.

Attribute Values Default Description
data-liquid-depth % of the stage, or px 24% The furthest any point of the surface may move from its rest line, a hard clamp. A percentage is of the stage height (of its width for left). Never more than 35% of the edge's length, so phones stay graceful
data-liquid-velocity 0 and up 1 How much scroll speed lifts the swell. 0 keeps a fixed gentle swell at every speed
data-liquid-waves 0 and up 1 How much a change of scroll speed (a flick, a stop, a reversal) throws waves into the surface. 0 gives a smooth swell with no waves; 2 is stormy
data-liquid-tension 0.2 to 4 1 How tightly the points pull on their neighbours. Higher makes waves travel faster and smoother; lower makes them slow and rolling
data-liquid-damping 0.1 to 6 1 How quickly the surface calms. 1 keeps it alive for about a second and a half after the scroll stops; 3 is syrup
data-liquid-line on, off on A thin line riding just inside the edge, coloured by the --liquid-line custom property on the container
data-liquid-direction up, left up up rises from the bottom edge; left sweeps in from the right with a vertical liquid edge
data-liquid-scroll number 100 Scroll length per scene, as a percentage of the viewport height
data-liquid-hold 0 to 0.8 0.15 Share of each scene's scroll spent at rest after it lands, so a scene can be looked at before the next one starts

Global defaults

Finer motion settings apply to every container. Pass them to init(), or define window.LiquidScenesOptions before script.js loads:

In your downloadThe working code for this step, in index.html.

Video

  • Videos play muted and inline only while their scene is the one on screen or the one rising into view, and only while the sequence itself is in the viewport. Every other video is paused.
  • Leave out the autoplay attribute: the script starts each film when its scene arrives. Without JavaScript, and under reduced motion, nothing plays and the poster image is the frame, so always give each video a poster (its first frame is best, so the switch is seamless).
  • Use preload="auto" on a film in the first scene and preload="none" on later ones; the script switches the next scene's film to preload="auto" while the scene before it is on screen, so it is ready when the edge reaches it.
  • Keep loops short and modest: the demo's two six-second 1080p films are 1.7 MB and 1.0 MB.

Works with Lenis

The script includes the standard Lenis wiring: Lenis and ScrollTrigger share one clock (gsap.ticker drives Lenis and every Lenis scroll updates ScrollTrigger), so the scrub and the surface follow the smoothed wheel exactly. If the page already runs Lenis as window.lenis, that instance is used and never destroyed. ?smooth=off in the URL, or <html data-smooth="off">, turns the script's own Lenis off; reduced motion turns it off too. Without the Lenis script, native scroll drives the same effect.

Accessibility

  • Reduced motion: nothing is pinned, clipped or moved. Every scene is a full-screen static frame in normal document flow, captions in place, videos on their posters. Switching the preference while the page is open tears the sequence down or builds it, live.
  • No JavaScript or a blocked CDN: the same stacked frames. The has-js class that sets up the stage is removed if GSAP or ScrollTrigger fail to load, and the optional head failsafe covers script.js itself failing.
  • Keyboard: the sequence is ordinary page scroll, so Page Down, Space and the arrow keys move through it.
  • Screen readers: scenes stay in reading order as figures with their captions. Give every image alt text and every video an aria-label. The generated shade and crest-line layers and the rolling counter are aria-hidden.
  • Contrast: captions sit over photographs, so keep a scrim (the demo's .scene::after) or check each image behind its text.

Dependencies

Required:

  • GSAP 3.12+ (the demo is built against 3.15.0)
  • ScrollTrigger plugin

Optional:

  • Lenis 1.3+ (the demo uses 1.3.17) for smooth scrolling

clip-path: path() (including evenodd for the crest line) draws the liquid edge, supported in current Chrome, Edge, Safari and Firefox.

Also in your download: the full source, worked examples, the events and programmatic API, and the class reference.

£7