Liquid Transition
v1.0.0A full-screen scroll- and swipe-driven page transition: a liquid S-curve wave curtain sweeps across the screen, swaps the content behind the cover, then peels away to reveal the next screen. Directional per step, boundary-locked (no looping), wheel and touch driven. Dependency-free.
Installation
npx vectorvesper add liquid-transitionRun npx vectorvesper init once first to set up your project.
Usage
Import
Usage
Client-only component — disable SSR
This component requires browser APIs and must be rendered client-side only.
prefers-reduced-motion and provides a graceful fallback.Props
A full-screen, scroll- and touch-driven page transition. An S-curve liquid wave sweeps across the screen in cycles (top-to-bottom, left-to-right, bottom-to-top, right-to-left), seamlessly swapping pages behind a solid curtain. Built with zero dependencies using vanilla requestAnimationFrame and high-performance SVG path manipulation.
<LiquidTransition />
A full-screen container that intercepts scroll/touch inputs to animate page transitions.
| Prop | Type | Default | Description |
|---|---|---|---|
pages* | PageData[] | — | An array of page data objects defining the content and colors for each screen transition. |
<PageData />
typeShape of the slide data objects passed in the pages prop.
| Prop | Type | Default | Description |
|---|---|---|---|
tag* | string | — | Small uppercase category tag/label displayed above the main title. |
title* | string | — | Main header text. Supports newlines. |
subtitle* | string | — | Description or supporting text paragraph below the title. |
bgColor* | string | — | Hex or CSS color string for the page background. |
textColor* | string | — | Hex or CSS color string for the page text. |
transitionColor | string | — | Hex or CSS color string for the fullscreen SVG wave curtain transition. Falls back to '#0e0e11'. |
Examples
d attribute, bypassing React re-renders during the wave animation for fluid 60fps sweeps.