Liquid
Pro effect
Most Shavin FX effects are free. This one is part of Shavin FX Pro, in early access. Join the Pro waitlist and we will email you once when access opens. You can preview it here in the meantime.
Join the FX Pro waitlistPlayground
Overview
Signups are up 18% week on week, led by the referral channel.
Origin
Palette
Cover
Reveals
Scrub progress
Install
npm install @shavin/fximport { LiquidTransition } from "@shavin/fx";Works with
React
Client component; Next.js and any React 18+ app
Remotion
Frame-exact through FxTimeProvider or time
Route transitions in an app shell
Overview
Signups are up 18% week on week, led by the referral channel.
import { LiquidTransition } from "@shavin/fx";
const pathname = usePathname();
<AppFrame routeKey={pathname} sidebar={…}>
<LiquidTransition routeKey={pathname}>
{children}
</LiquidTransition>
</AppFrame>From the click, in the brand ramp
Overview
Signups are up 18% week on week, led by the referral channel.
<LiquidTransition routeKey={pathname} origin="pointer" colors="theme">
{children}
</LiquidTransition>A photo melting away
The WebGL shader samples coverImage, so a cross-origin image needs CORS headers.
Overview
Signups are up 18% week on week, led by the referral channel.
<LiquidTransition routeKey={pathname} coverImage="/assets/hq_marshall.jpg" softness={0.4}>
{children}
</LiquidTransition>Remotion and scrubbers
Drive progress from the frame: -1 to 0 sweeps the cover in, 0 to 1 clears it. Swap the scene at 0. Each frame is a pure function of progress, so every render matches.
Billing
Next invoice on 1 December. Usage this cycle is within the plan.
import { interpolate, useCurrentFrame } from "remotion";
import { LiquidTransition } from "@shavin/fx";
const frame = useCurrentFrame();
// -1 → 0: the cover sweeps in over scene A; 0 → 1: it clears off scene B.
const p = interpolate(frame, [0, 24, 48], [-1, 0, 1], {
extrapolateLeft: "clamp",
extrapolateRight: "clamp",
});
<LiquidTransition routeKey="intro" progress={p} className="absolute inset-0">
{p < 0 ? <SceneA /> : <SceneB />}
</LiquidTransition>Props
| Prop | Type | Default | Description |
|---|---|---|---|
| routeKey* | string | — | Changes on navigation (usePathname(), a tab id); nothing plays on the first render. |
| children* | ReactNode | — | The next content. It renders at once, under the cover, and is revealed as the cover clears. |
| duration | number | 600 | Total length in ms; reduced motion and data-fx-paused get a 120 ms fade. |
| origin | "left" | "right" | "top" | "bottom" | "center" | "pointer" | { x, y } | "center" | Where the motion starts. "pointer" uses the last press (the nav link that was clicked); under controlled time it falls back to the centre. |
| colors | FxPalette | "native" | Cover colours: the variant's own look, "theme" (a ramp from the brand colour), or a list of colours. |
| softness | number | 0 | Feathers the moving fronts, 0 crisp to 1 soft. |
| coverImage | string | — | An image the cover is made of instead of flat colour (e.g. the outgoing slide), so the wipe goes straight from it to children. |
| scope | "container" | "viewport" | "container" | Cover the wrapper (pinned to the viewport while scrolling) or the full screen. |
| progress | number | — | Controlled progress: 0 covered, 1 revealed; -1..0 plays the cover sweeping in. Nothing animates on its own and routeKey changes are ignored. For scrubbers and video frames. |
| time | number | — | Controlled seconds since the transition started (or an FxTimeProvider's time); the reveal plays 0..duration. progress wins. |
* required