125

Curved Lift Transition

£7
or the whole Vault, £99
Open in new tab

A preloader and page transition on one panel that only travels downward: it cycles your words on first load, then falls out of the bottom with an edge that bends with its speed. Between pages it enters from the top with the destination's name and carries on down onto the new page.

advanced
9 more details
page-transitionsoft-navigationload-sequencesvg-pathvelocity-reactiveinterruptible-transitionsqueued-transitionsfocus-managementprogressive-enhancement

Updated

About this effect

One coloured panel handles both moments a visitor notices, and it only ever travels downward. On first load it covers the page, runs a short cycle of words you choose, then falls out of the bottom of the screen. Its trailing top edge bows as it picks up speed and flattens as it goes, like a sheet with weight, rather than sliding away as a hard rectangle.

Read the full effect overview

Follow a link and the same panel enters from the top with its leading edge bowed, shows the name of the page you are going to while that page is swapped in underneath, then carries on down and out. The curve follows the panel's actual speed, so a faster move bends it further and a move turned round halfway flexes the other way. Underneath is soft navigation for ordinary multi-page HTML: the next page is fetched and swapped while the panel covers the screen, with history, scroll position, focus and an announcement handled.

Curved Lift Transition - GSAP animation effect preview

What's included

8 items
  • Curved leading and trailing edges driven by the panel's measured speed through a damped spring, so they deepen as the panel accelerates and settle flat with a little give
  • First-load word cycle from a pipe-separated attribute, held only until the page is ready, with a minimum hold so it reads and a hard cap so it never delays a ready page
  • Returning visitors in the same session see a short version: the current page's name, then the exit
  • Between pages the panel enters from the top, shows the destination's name (from an attribute, or the page title) while the page swaps underneath, then passes out of the bottom
  • Fetch-and-swap navigation with prefetch on hover and focus, history with scroll restoration, focus moved to the new heading and the new title announced
  • Interruptible: a click on the page while the panel falls away turns it straight round, a click while covered retargets, and Back during a transition ends on the right page
  • Shallower curve on phones, a short crossfade with no travel under reduced motion, and ordinary links when JavaScript is off
  • Replay, pause, play and navigate methods, start and end events, and one revert call that restores the page as it was

Perfect for

4 use cases
  • Studio, agency and portfolio sites built as plain HTML pages that want a signature intro and app-like page changes without a framework
  • Brand and product sites where a few words on the first screen set the tone before the page appears
  • Shops and showrooms with a handful of pages where the destination name on the panel keeps visitors oriented
  • Existing static sites that want a preloader with a strict time budget rather than a spinner that holds the page hostage

How it works

1 section

The panel is in the page's HTML and covers it from the first paint, so nothing flashes before the intro; the content itself is ordinary HTML underneath for visitors without JavaScript and for crawlers. The panel's fill is one SVG path, a rectangle with curved top and bottom edges, sized to the viewport in pixels so each edge spans the full width at any aspect without a seam. GSAP tweens the panel's travel and the word changes, and on every frame of the GSAP ticker the panel's speed is measured and fed into a small damped spring that sets the depth of the curve on the leading edge as the panel enters and the trailing edge as it leaves. The first-load sequence waits on the page load and web fonts, with a minimum hold and a hard cap. Same-origin links are fetched, the page container is swapped while the panel covers the screen, and history entries remember scroll position. Under reduced motion the page crossfades instead and the intro shows its first word for a beat.

Difficulty Advanced
Includes HTML + JS + CSS source, documentation, AI setup prompt, lifetime updates

Lighthouse, as measured

Google Lighthouse on this effect's demo (3 pages, lowest score shown), 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. In the <head> of every page, before the stylesheet:

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

2. At the start of <body> on every page, the panel:

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

3. Wrap each page's content in one container:

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

4. Before </body>:

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

Serve the pages from a web server (soft navigation needs fetch, so file:// falls back to ordinary page loads, with the intro still playing).

Using It With Your Own Design

What the effect needs from your markup: one [data-cl-panel] element outside the swapped container (it persists between pages), and one [data-cl] container on every page, holding everything that changes between pages. Put the panel on every page, because any page can be the first one a visitor opens. The new page's main h1 receives focus after a swap. Everything outside [data-cl] (the panel, a fixed header if you want one to persist, analytics snippets) stays as it is.

What is only the demo's styling: everything below the "Demo site" comment in style.css: the homeware shop layout, fonts, photographs and the replay link. Keep the first block (the panel rules) and change its three colour tokens.

CSS the effect depends on:

  • .has-js [data-cl-panel] { visibility: visible } is what covers the page from the first paint, so the content never flashes before the intro. The content is still in the HTML underneath for crawlers and for visitors without JavaScript. If the script never starts, a CSS fail-safe drops the cover after five seconds.
  • The panel is position: fixed, full width, 100lvh tall, with a high z-index (--cl-z). Do not give it padding or a border: the curved edges are drawn from its measured box and overhang it by the curve depth.
  • The words sit in .cl-panel__line, which clips them (overflow: hidden) as they rise in and out.

Options and API

Set these on [data-cl-panel]:

Attribute Values Default Description
data-cl-words Pipe-separated text none Words cycled on first load. Without it the intro shows the current page's name
data-cl-once present / false absent Play the word cycle once per browser session. Later full page loads show the short version: the page's name, then the exit
data-cl-duration Seconds 0.8 Length of the exit, as the panel falls out of the bottom
data-cl-drop Seconds 0.55 Length of the entry from the top between pages
data-cl-bow 0 and up 1 Depth of the curve. 0 gives straight edges, 1.5 a deeper bend
data-cl-word-time Seconds 0.42 Time each word gets in the cycle
data-cl-min-hold Seconds 1.2 Shortest first-load sequence, so the words can be read
data-cl-max-hold Seconds 4 Hard cap. The panel leaves by then even if the page is still loading
data-cl-push Fraction of the viewport 0.06 How far the page underneath settles downward as the panel falls away from it. 0 turns it off

On each page's container:

Attribute Description
data-cl The container swapped between pages
data-cl-title The name shown on the panel when arriving at this page. Falls back to the part of <title> before a colon, `

On links: data-cl-ignore (on the link or any ancestor) leaves a link to the browser. Links with target, download, modifier keys, other origins and same-page #anchors are always left alone.

CSS custom property Default Description
--cl-panel #1fb563 Panel colour
--cl-ink #0d120f Words and page names on the panel
--cl-accent #f7f7f6 The dot beside them
--cl-z 1000 Panel stacking order

JavaScript

In your downloadThe working code for this step, in script.js.

pause() turns link interception off (links become ordinary page loads) and holds a running sequence under the panel just before it leaves. play() resumes both. While paused, the hard cap does not apply: you asked for the hold.

Events

All are dispatched on document.

Event Detail When
cl:start { kind, url } A sequence begins. kind is load, replay or navigate
cl:leave { container, url } Just before the old container is removed
cl:swap { container, url, trigger } The new container is in the page (still covered). Start your page scripts here
cl:end { kind, url } The panel has left the screen
cl:error { url, error } A fetch failed; the browser then loads the page normally

Scripts inside a fetched container do not run. Initialise page-specific code from cl:swap and clean it up on cl:leave.

Interruptions

The rule is retarget while covered, turn round while leaving:

  • A second click on the same link, or a rapid double-click, is ignored.
  • A new destination before the page has been swapped (another API call, or Back) retargets the running transition; nothing is swapped twice.
  • A new destination after the swap but while still covered queues and runs under the same cover, without the panel leaving in between.
  • A click on the page while the panel is falling away turns it straight round from where it is to cover the screen again; the curve flexes as it changes direction.
  • Back during a transition always ends on the page the address bar shows.

Accessibility

  • Focus and announcement: after each page swap focus moves to the new page's h1 (or main), the document title updates and a polite live region announces it.
  • The panel is aria-hidden and holds no focusable elements, so it never traps focus.
  • Reduced motion: the first load shows the first word for a beat and the panel fades away, with no travel. Between pages the content crossfades with no panel, no movement and no scale.
  • No JavaScript, no GSAP or a blocked CDN: the panel never covers the page and every link is an ordinary link.
  • Time budget: the first-load sequence waits only for the page load and web fonts, with a minimum hold so the words read and a hard cap after which it leaves regardless. Returning visitors in the same session get the short version when data-cl-once is set.

Dependencies

  • GSAP 3.12+ (core only). The demo is built against GSAP 3.15.0.

Teardown

CurvedLift.revert() (or window.gsapContext.revert()) kills the running animations, removes every listener and the live region, empties the panel back to the markup you wrote, removes .has-js so the CSS cover cannot return, and restores the browser's scroll restoration. Links are ordinary links again.

Images and Credits

The demo photographs are from Pexels, whose licence permits modification and redistribution, and are baked into graded WebP files in assets/img/. Replace them with your own.

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

£7