Skip to the content

Page wipe

A sober page transition, between real pages.

Become a member to unlock the full effect today.

Join now

Already a member? Sign in

Version

Documentation

  1. Copy to Webflow

    Add Geist and Geist Mono to your site's fonts (Site settings, Fonts, Google Fonts) before pasting: Webflow removes any font your site has not installed.

  2. Add custom CSS

    This code has to be on every page of the site, which an Embed on one page is not. Best place: Site settings, Custom code tab, Head code, the <style> and the scripts together (the field holds 50 000 characters, this is under 30 000), then publish: the page reached is under the sheet from its first paint. Otherwise keep the Embed, as a Component in your navbar. A second copy of the script on a page does nothing. The name is set in the typeface of the Body; one rule on .page-wipe-name gives it another.
  3. Add custom JS

  4. Tune it

    Custom attributes
    Select the section on the canvas and open the Settings panel. Under Custom attributes, add a pair: the name on the left, the value on the right.
    Custom attributeWhat it does
    data-page-wipe Marks the element whose links are taken: the Body for every link of the page, or a menu for its links only. It takes no value: leave the value field empty. The settings go on the same element. Without it on any element of the page, the embed marks the Body.
    data-page-wipe-skip On a link, or on any block: the links inside are left to the browser, with no transition. It takes no value. [ Optional ]
    data-page-wipe-name On a link: the name written at the foot of the sheet, in place of the words of the link. Without it the link writes its own words, a link made of a picture its alt text, and a link whose words are too long the last part of its address. [ Optional ]
    data-page-wipe-state Written by the engine on the html element: idle at rest, leaving while the sheet comes in, covered until the browser changes page and while the sheet waits on the page reached, arriving while it lifts, frozen for a held picture, still under reduced motion. Never written by hand. [ Optional ]
    Settings
    Every setting is a custom attribute too, added the same way and on the same section. An attribute always wins over the defaults written in the code.
    AttributeDefaultWhat it is
    data-page-wipe-background #15100c Colour of the sheet, and of the screen the next page starts under. Options: any CSS colour; a light one, with a dark color, for a sheet of paper over a dark site.
    data-page-wipe-color #f4ece0 Colour of the name written at the foot of the sheet. Options: any CSS colour that reads on background.
    data-page-wipe-from bottom Side of the window the sheet comes from; it leaves by the opposite side, going on the way it came. Options: bottom rises, top falls, left and right cross the window sideways.
    data-page-wipe-cover 0.8 Time the sheet takes to cover the page, from the click, in seconds.
    data-page-wipe-hold 0.25 Time the page stays covered before the browser is sent on, in seconds; the name finishes rising during it.
    data-page-wipe-reveal 0.9 Time the sheet takes to uncover the page reached, in seconds.
    data-page-wipe-patience 4 Longest the sheet waits, in seconds: on the page being left, for the browser to leave; on the page reached, for its typefaces and the pictures in the window, counted from the start of the navigation.
    data-page-wipe-label true Whether the name of the page being reached is written on the sheet. Options: true writes it; false leaves the sheet bare.
    data-page-wipe-label-size clamp(44px, 9vw, 136px) Size of the name, any CSS unit; a name too long for the window is set smaller, on one line.
    data-page-wipe-prefetch true Whether the next page is asked for while the sheet is still coming in, so it is there when the browser goes. Options: true fetches it, through speculation rules or a prefetch link, except an address carrying a query and except on a site whose own page took over 0.8 s to answer; false lets the browser fetch it when it goes.
    data-page-wipe-links a[href] CSS selector of the links the transition takes, among those inside the marked element. Options: a[href] takes every link; a narrower selector, nav a for one, takes only those.

What it does

Page wipe is a page transition for Webflow and vanilla JavaScript, with no library. Also called page wipe transition, overlay page transition or page transition without barba.

A sober page transition, between real pages. A click on a link to another page of the site brings one flat sheet of ink over the window, from the bottom by default, starting gently and settling; its soft shadow falls on the page along the edge that travels. The name of the page being reached rises through a one line window at the foot of the sheet, large, in the typeface of the site. The browser then goes to the next page for real, which starts under the same sheet from its first paint, the name standing where it stood. The sheet waits there for what the visitor will see first, the typefaces and the pictures in the window, then the name leaves upwards and the sheet goes on the way it came, uncovering the page. There is no router and no library: the pass between the two pages, the name, the colours, the side and the times, is kept in sessionStorage for the time of the navigation, and the next page is fetched while the sheet is still coming in. It works wherever links lead to real pages, a Webflow site for one. Links to another site, to a new tab, to a file, mailto: and tel:, and anchors of the page are left to the browser, like any click with a modifier key; one attribute on a link leaves it out. A page that does not answer is given back after a few seconds, Escape gives it back at once, and Back never finds a page left under the sheet. Under reduced motion nothing is taken: the links navigate as they always did.

Updated

Questions

Paste the component, then move the code of its Embed to Site settings, Custom code, Head code and publish, or turn the Embed into a Component placed in your navbar: the code has to be on every page, since a transition has two ends. It marks the Body by itself, so every link to another page of the site is taken. Settings are custom attributes on the Body, for instance data-page-wipe-from="left".

No. The browser loads the next page for real, so Webflow interactions, forms and analytics run as on any page. The pass between the two pages (the name, the colours, the side and the times) is kept in sessionStorage for the time of the navigation, and the sheet is moved with the Web Animations API.

Back and Forward play nothing, and a page the browser kept in memory under the sheet is given back at once as it was before the click. On a slow page the sheet waits for the typefaces and the pictures in the window, data-page-wipe-patience seconds at most (4 by default); a page that never comes gets the sheet withdrawn the way it came, and Escape gives the page back at once.

Mark the link, or any block around it, data-page-wipe-skip. Links to another site, target="_blank", download, files, mailto: and tel:, anchors of the page itself and clicks with Cmd, Ctrl, Shift or Alt are already left to the browser.

Yes. data-page-wipe-from takes bottom, top, left or right; data-page-wipe-cover, data-page-wipe-hold and data-page-wipe-reveal are the three times in seconds (0.8, 0.25 and 0.9 by default). The name written is the words of the link, data-page-wipe-name="Order desk" on the link gives another one, and data-page-wipe-label="false" leaves the sheet bare.