Components / effect

Diagonal Wipe Transition

v1.0.0 · premium

The next page is revealed by a diagonal edge that sweeps across the old page, and back the other way.

Diagonal Wipe Transition demo

Implementation

The next page is revealed by a diagonal edge that sweeps across the old page, and back the other way.

Framework
React 19.3.1 with TypeScript
Motion
Native CSS and browser APIs. No GSAP required.
Available modes
build
Version
1.0.0 · published

Source code

Download source ZIP
export function DiagonalWipe({ viewKey, children, direction = 'forward', duration = 1000, className }: {
  /** A key that changes for each page, such as the route path. */
  viewKey: string;

Quality evidence

Export tested in 2 consumer projects with chromium, firefox, webkit. Evidence recorded on .

Changelog

v1.0.0 · The next page is revealed by a diagonal edge that sweeps across the old page, and back the other way.

Frequently asked questions

How is the diagonal edge animated?

A registered CSS property moves the edge inside a clip path, so the browser draws it with no animation frame loop.

Which way does it sweep when going back?

Starting from the bottom right instead of the top left, so the motion reverses.