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 Expand Transition
File Drawer CardsBrowse all 182Card Shrink 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 Expand 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
  • Expand
  • Split text
  • Morph

Features.

  • The card you click grows into the next page's full-screen picture
  • Going home, the picture shrinks back into its card
  • Pictures are matched by name, so any number can travel at once
  • Everything else cross-fades; the new title lifts in letter by letter
  • Click another page mid-morph and it follows straight after; the newest click wins
  • The nav sits above every page, never moves and stays clickable
  • window.au.CardMorph.go(el, "page-2") runs the transition from your own code
  • Respects prefers-reduced-motion: pages swap instantly

How to get it right.

Give both ends the same name

A card and a full-screen picture become one picture when they carry the same data-cmo-media value. A name that is only on one page just fades.

Keep the card the screen's shape

The picture is scaled between its two boxes. The cards are sized in vw and svh from one number, --cmo-card, so they match the screen and nothing stretches. A card of another shape will squash on the way.

Putting a photo in

Add an <img> inside each .cmo_media and give it width: 100%; height: 100%; object-fit: cover. Use the same file at both ends so nothing swaps when it lands.

Variations.

  • Slower morph — data-au-duration="1.2"
  • A different curve — data-au-ease="snappy" (or soft, linear; smooth is the default)
  • 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
  • Darker or lighter old page — data-au-dim="0.2"; 1 leaves it at full brightness
  • Title later or sooner — data-au-title-delay="0.7" starts it 70% of the way through the morph; 0 starts it with the click
  • Looser title — data-au-title-stagger="0.04"; 0 lifts every letter at once
  • Bigger cards — --cmo-card: 32 on the root
  • More pages — add a card on the first page, a <main data-cmo-page="page-4" hidden> with a full-screen picture of the same name, and a nav link
  • Labels under the cards — add a <span data-cmo-fade> after the picture inside .cmo_card; it dims and fades with its page
  • Your palette — override --cmo-one, --cmo-two, --cmo-three and their -ink partners on the root

Where it fits.

  • Portfolios — project grid to case study
  • Shops — product card to product page
  • Galleries — thumbnail to full-screen picture
  • 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.CardMorph.go(el, name).

The morph in flight lands, then the last page you asked for morphs in. Clicks in between are skipped.

The old page's picture fades out, the new one fades in over the second half, and the rest cross-fades.

Yes. Mark anything that should cross-fade with data-cmo-fade and keep it under z-index: 2 if the travelling picture should pass over it.

Related components.

NewPro

Bell Wipe Transition

Click

Pro

Card Shrink Transition

Click

Pro

Column Rise Transition

Click