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 transitionsCard Shrink Transition
Card Expand TransitionBrowse all 182Column Rise 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

Card Shrink 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

  • Card
  • Wipe
  • Split text

Features.

  • The page shrinks to a card while a blank card wipes up over it
  • The next page wipes up over the blank card, then grows to fill the screen
  • The pages swap behind the blank card, so nothing is seen changing
  • The new title lifts in letter by letter, starting 40% into the reveal
  • Click another page while the old one is shrinking and the newest click wins; click during the reveal and one more transition follows
  • The nav sits above the cards, never moves and stays clickable
  • Focus moves to the new page when a nav link had it
  • window.au.CardShrink.go(el, "page-2") runs the transition from your own code
  • Respects prefers-reduced-motion: pages swap instantly

How to get it right.

Pick a backdrop none of the pages share

The backdrop (--csh-backdrop) is what shows round the cards. A page in the same colour has no edge once it shrinks, and the card disappears. The same goes for the blank card (--csh-sheet).

Give every page a solid background

The blank card sits right behind the new page while it wipes up. A page without a background lets it show through.

Keep the nav outside the pages

The nav bar is a sibling of the pages, so it doesn't shrink with them. Put anything else that should hold still next to it, with a z-index above 3.

Variations.

  • Slower — data-au-duration="1"; the whole transition takes 2.6 × that
  • Smaller cards — data-au-scale="0.6"
  • Show the mark for longer — data-au-hold="0.4" keeps the blank card up before the next page comes
  • Another curve — 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
  • From another edge — data-au-from="top", "left" or "right"
  • Your mark — swap the square in the sheet for your own SVG, or delete it
  • More pages — add a <main data-csh-page="page-4" hidden> and a link with data-csh-link="page-4"
  • Your palette — override --csh-backdrop, --csh-sheet, --csh-mark and the page colours on the root

Where it fits.

  • Portfolios — case study to case study
  • Small sites — a handful of pages kept in one document
  • Product tours — full-screen steps
  • 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.CardShrink.go(el, name).

While the old page is still shrinking, the last page you asked for is the one that rises. Once a page is rising, it finishes and then the transition runs again for the new page.

Not from an option. Add a border-radius to .csh_page and .csh_sheet while data-csh-phase isn't idle; both already clip their content.

Yes. Each <main> is an ordinary full-screen container; put anything in it. It all shrinks with the page.

Related components.

NewPro

Bell Wipe Transition

Click

Pro

Card Expand Transition

Click

Pro

Column Rise Transition

Click