Platform
VaultVault
  • Free15
  • Navigation19
  • Buttons9
  • Scroll55
  • Text27
  • Sliders & marquees19
  • Gallery & images67
  • Cursor24
  • Page transitions10
  • Loaders2
  • Backgrounds10
  • UI components33
ButtonsPart of ProButtons
IconsPart of ProIcons
  • Interface Essentials144
  • Social Icons69
  • Payment Badges41
SavedPart of ProSaved
Support
DocumentationDocumentation
MCP serverMCP server
SettingsSettings
VaultPage transitionsCorner Swing Transition
Column Rise TransitionBrowse all 182Soft Fade Transition
  • Free15
  • Navigation19
  • Buttons9
  • Scroll55
  • Text27
  • Sliders & marquees19
  • Gallery & images67
  • Cursor24
  • Page transitions10
  • Loaders2
  • Backgrounds10
  • UI components33
  • Interface Essentials144
  • Social Icons69
  • Payment Badges41
Sign inSign in

Start free. The code for 15 components, no card needed.

Get 15 free

Corner Swing Transition

This one is locked. Become a member to open the code for it and the rest of the Vault.

See plansTry the 15 free ones

What you'll need.

Install

  • gsap
  • CustomEase
  • SplitText

Setup

npm i gsapregisterPlugin(CustomEase, SplitText)

More like this

  • Reveal
  • Wipe
  • Split text

Features.

  • A slab hinged at the bottom-left corner swings up over the page like a door
  • The page under it darkens as it is covered
  • The pages swap while the slab fills the screen
  • The slab swings on round the bottom-right corner and off, and the next page brightens
  • A mark on the slab turns with it and sits dead centre when the screen is covered
  • The new title lifts in letter by letter as the slab leaves
  • Change your mind while the slab is coming in and the newest click wins
  • window.au.CornerSwing.go(el, "page-2") runs the transition from your own code
  • Respects prefers-reduced-motion: pages swap instantly

How to get it right.

Let the root fill the viewport

The slab is sized and placed in viewport units so it covers the screen at every angle. In a root narrower or shorter than the viewport the pivots land in the wrong place.

Keep the slab after the pages

The slab sits between the pages and the nav. Leave it as one element with data-csw-slab, after the last page.

Swap the mark for your own

The square on the slab is a placeholder. Replace the SVG with your logo; it takes --csw-mark through currentColor.

Variations.

  • Slower swing — data-au-duration="1.2"
  • Longer pause on the mark — data-au-hold="0.4"
  • Swing the other way — data-au-from="right"
  • A different feel — data-au-ease="snappy", "soft" or "linear"
  • More curves — data-au-ease also takes expo-out, expo-in-out, back-out, windup, drive, kick, spring, hop. back-out, spring and hop run past the end and settle back; windup pulls back first
  • No darkening under the slab — data-au-dim="0"
  • Plain slab — delete the SVG inside the slab
  • More pages — add a <main data-csw-page="page-4" hidden> and a link with data-csw-link="page-4"
  • Your palette — override --csw-slab, --csw-mark, --csw-one, --csw-two, --csw-three and their -ink partners on the root

Where it fits.

  • Portfolios — case study to case study
  • Small sites — a handful of pages kept in one document
  • Brand sites — the hold is a moment for the logo
  • Router transitions — call go() from your router's hook

Frequently asked.

No. The pages live in one document and the script shows and hides them. For a router, render the pages into the root and call window.au.CornerSwing.go(el, name).

While the slab is swinging in, the last page you click is the one that shows. Once it is swinging off, a click on another page runs one more swing straight after.

It has to cover the whole screen at every angle of both swings, on wide and tall screens. It is twice the longer side of the viewport, and clipped by the root.

So each letter can rise through a mask. The split is undone once a page is hidden.

Related components.

NewPro

Bell Wipe Transition

Click

Pro

Card Expand Transition

Click

Pro

Card Shrink Transition

Click