Skip to the content

Push menu

A full-screen menu that does not cover the page: it is behind it.

Become a member to unlock the full effect today.

Join now

Already a member? Sign in

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

    On a site of your own, three steps. 1. Paste: one section arrives, Push menu section, which holds the block Page: move all your sections in here, the menu (Menu) and the Embed. 2. In the Navigator, drag every section of your page into that Page block, navbar and footer included, and delete the example screens. 3. Leave the menu and the Embed where they are, beside the Page block, never inside it. Whatever stays outside the block, a navbar or a footer placed straight in the Body, does not go back with the card and stays over the menu. The Body itself cannot be the page, since the menu has to sit outside it. The Page block carries data-push-menu-page and needs the background of your page: behind it there is the menu, which keeps an opaque background of its own.
  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-push-menu Goes on the menu, the nav placed after the page, and takes no value: leave the value field empty. It marks the block the engine mounts on, which carries the settings and the state, and which becomes the layer under the page. Without it on any element, the embed marks the nav around the first link marked data-push-menu-link itself.
    data-push-menu-page Marks the page: the one wrapper around everything a visitor sees but the menu, header and footer included. It is the box that is set back as a card. It sits right before the menu, never around it. Without it the menu is not mounted, and the console says so. [ Required ]
    data-push-menu-toggle Marks the button that opens the menu, anywhere on the page, as a rule in its header: a link to the id of the menu, which the script turns into a button with aria-expanded and aria-controls. Without it nothing opens the menu but JavaScript. [ Required ]
    data-push-menu-close Marks the button of the menu that closes it. A button that lives in the page is out of reach once the page is a card, so the menu has its own. Without it the engine builds one, first in the menu. [ Optional ]
    data-push-menu-link Marks what arrives one after the other when the menu opens, and what takes the accent under the pointer: the links as a rule. A link to a section of the page, #paper for one, also shows that section in the card. Without it on anything, every link of the menu is taken. [ Optional ]
    data-push-menu-backing Marks the box that wears the shadow of the card and takes the click on it: one empty block, last in the menu. Its shadow is its class. Without it the engine builds one. [ Optional ]
    data-push-menu-state Written by the engine on the menu and on the page: closed, opening, open or closing. The stylesheet hides and shows the menu from it. 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-push-menu-accent #ffab1a Colour of the link under the pointer or the keyboard, written on the menu as --push-menu-accent. Options: any CSS colour; set it empty and a --push-menu-accent of the stylesheet takes over.
    data-push-menu-side right Side of the window the page is set down on. The links come out from that side, and the card leans to face the other. Options: right; left, and the blocks of the menu are sent to the right side of the window.
    data-push-menu-scale 0.72 Size of the page once it is a card, as a share of the window, on a wide window.
    data-push-menu-shift 44vw How far the card travels sideways from the centre of the window, any CSS length, on a wide window. Part of the card leaves the window: that is what frees the room for the links.
    data-push-menu-drop 0vh How far the card travels down, any CSS length, on a wide window.
    data-push-menu-tilt 9 Lean of the card in perspective, in degrees, around its upright axis. It passes its angle and settles as the card lands.
    data-push-menu-radius clamp(14px, 1.8vw, 28px) Corner radius of the card on screen, any CSS length.
    data-push-menu-open 1.05 Time the page takes to be lifted, carried aside and set down, in seconds; the links are timed from it.
    data-push-menu-close 0.8 Time the page takes to come back, in seconds, and to reach the section of the link that was chosen.
    data-push-menu-ease power4.inOut Shape of the sideways travel, a GSAP ease name. The lift and the lean keep their own. Options: any GSAP ease; inOut reads as a sheet carried, an out ease as a sheet thrown.
    data-push-menu-travel clamp(28px, 6vw, 96px) Distance a link arrives from, any CSS length: it starts that far towards the card, under it, and slides to its place.
    data-push-menu-stagger 0.06 Delay between two links arriving, in seconds.
    data-push-menu-peek true Whether a link to a section of the page shows that section in the card while the pointer or the keyboard is on it. Leaving the links brings back the place the visitor was at. Options: true; false, and the card only moves when a link is chosen.
    data-push-menu-breakpoint 767 Widest window, in px, that gets the phone card: phoneScale, phoneShift and phoneDrop instead of scale, shift and drop.
    data-push-menu-phone-scale 0.74 Size of the card on a phone, as a share of the window.
    data-push-menu-phone-shift 52vw Sideways travel of the card on a phone, any CSS length.
    data-push-menu-phone-drop 24vh Downward travel of the card on a phone, any CSS length: it brings the card to the lower corner, under the links and within reach of a thumb.
    data-push-menu-escape true Whether Escape closes the menu and hands the focus back to the button. Options: true; false.
    data-push-menu-close-on-page true Whether a click or a tap on the card brings the page back. The card also rises under the pointer to say so. Options: true; false, and the card is only a picture.
    data-push-menu-close-on-link true Whether choosing a link closes the menu. A link to a section of the page then scrolls there while the page comes back. Options: true; false, and a link to a section only shows it in the card.
    data-push-menu-label-open Menu Text of a button placed outside the page while the menu is closed. A button inside the page travels with the card and keeps its text; nothing is written on a button that holds an element. Options: any text.
    data-push-menu-label-close Close Text of that button while the menu is open, and of the Close button the engine builds when the menu has none. Options: any text.

What it does

Push menu is an animated navigation component for Webflow and vanilla JavaScript, built on GSAP 3. Also called perspective push menu, page push back menu or 3D off-canvas menu.

A full-screen menu that does not cover the page: it is behind it. Opening takes the whole page as one sheet and sets it back, smaller, to one side, leaning in perspective, with round corners and a deep shadow, like a card put down on a table, and the menu is what was underneath, its links coming out from under the card one after the other in large type. The page stays in view as that card, at the place the visitor had reached, sticky and fixed headers included, and the document never jumps: it keeps its scroll and nothing is written on html or body. A link to a section of the page shows that section in the card while the pointer or the keyboard is on it; choosing it brings the page back already there. A click on the card, the Close button or Escape brings it back where it was. While the menu is open the page is inert, out of the focus order and of the accessibility tree, and cannot be scrolled; the menu is a real nav of real links, the button carries aria-expanded and aria-controls, the focus moves into the menu and returns to the button. On a phone the card drops to the lower corner, where a thumb reaches it. Under reduced motion the page is simply set back, with no travel and no lean. Without the script the menu is a plain list of links at the foot of the page, and the button is a link to it. Not the curtain menu, which covers the page, nor the anchored or the mega menu, which open a box over it: here the page itself is the moving part. Pattern type push menu, perspective navigation, off-canvas menu, page pushed back.

Updated

Questions

Two parts, side by side: one wrapper marked data-push-menu-page around everything a visitor sees, header and footer included, and after it a nav marked data-push-menu, with data-push-menu-toggle on the button that opens it. In Webflow, paste, then drag every section of your page into the block named Page: move all your sections in here, and leave the menu and the Embed beside it. Opening sets the page back as a tilted card and the menu is what was underneath.

No. The wrapper never leaves the flow: the card is the page itself, cut with a clip-path to what the window shows and transformed around the centre of the window, so the document keeps its scroll and nothing is written on html or body. A sticky header stays at the top of the card, and a fixed header or a fixed corner button is found at each opening and held where it was.

Yes, by default. A link to a section of the page, href="#paper", shows that section in the card while the pointer or the keyboard is on it, and choosing it brings the page back already there. Leaving the links brings back the place the visitor was at, and data-push-menu-peek="false" keeps the card still until a link is chosen.

GSAP 3 drives the motion, with no plugin, and Webflow's own copy is used when it is there. data-push-menu-scale, 0.72 by default, is the size of the card, data-push-menu-shift, 44vw, how far it goes aside, data-push-menu-tilt, 9 degrees, its lean, and data-push-menu-side the side it is set down on. Without GSAP or under reduced motion the page is set back at once, flat, and the links are simply there.

The menu is a real nav of real links. The button carries aria-expanded and aria-controls, opening moves the focus to Close and closing puts it back on the button, and Escape, the Close button or a click on the card brings the page back. While the menu is open the page is inert, out of the focus order and of the accessibility tree. At or under data-push-menu-breakpoint, 767 px by default, the card drops to the lower corner, within reach of a thumb.