Skip to content
animorio
IT
Back to the library

Drifting card wall

Backgrounds, HoverGSAP, CSS onlyMediumCompressed weight: Demo 7.4 KBGSAP 28 KBFreeDownload the zip

An animated background for the opening of a design app, in the style of Morphin, on light paper: behind the headline a wall of small product cards (charts, toggles, buttons, palettes, search fields) tilted in perspective, with its columns drifting slowly in alternate directions and fading towards the edges. The pointer slows down the column it is over and lifts the card under it a little.

The code

A folder that runs on its own: index.html, style.css, script.js and the libraries from a CDN. The React and Vue tabs hold the same demo as a ready component, which switches its animations off when it leaves the page.

<!doctype html>
<!--
  "Drifting card wall" from Animorio · https://animorio.com
  License: free on your own sites and your clients’ sites, paid work included.
  Not for resale, redistribution, templates or code collections · https://animorio.com/en/license/
-->
<html lang="en">
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title>The background wall of cards drifting in perspective</title>
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fontsource-variable/mona-sans@5.3.0/wdth.css">
  <link rel="stylesheet" href="style.css">
</head>
<body>
  <!-- the hero of an invented design tool, Driftboard: behind the words a wall of small product cards (charts, toggles,
       buttons, palettes) tilted in perspective, its columns drifting slowly in alternate directions. The pointer slows
       the column it is over and lifts the card under it a hair -->
  <main class="stage" data-stage>
    <div class="scene" aria-hidden="true">
      <div class="wall" data-wall></div>
    </div>
    <span class="veil" aria-hidden="true"></span>

    <section class="hero" aria-labelledby="hero-title">
      <p class="pill" data-in>
        <span class="pill__tag">New</span>
        <span class="pill__text">Auto layout, now with springs</span>
      </p>
      <h1 class="title" id="hero-title" data-title>
        <span class="line"><span class="word">Every</span> <span class="word">screen,</span></span>
        <span class="line"><span class="word">in</span> <span class="word">one</span> <span class="word">place</span></span>
      </h1>
      <p class="lede" data-in>Driftboard keeps your components, flows and prototypes on one calm canvas.</p>
      <div class="actions" data-in>
        <button class="cta" type="button" data-cta>
          <span class="cta__label">Start designing</span>
          <svg class="cta__arrow" viewBox="0 0 16 16" aria-hidden="true"><path d="M3 8h9.5M8.5 4 12.5 8l-4 4"></path></svg>
        </button>
        <span class="note">Free for two editors</span>
      </div>
    </section>

    <svg class="ghost" data-ghost viewBox="0 0 20 20" aria-hidden="true"><path d="M4 2.5v13.2l3.5-3.3 2.4 5.3 2.3-1-2.4-5.2 4.8-.2z"></path></svg>
  </main>

  <script src="https://cdn.jsdelivr.net/npm/gsap@3.15.0/dist/gsap.min.js"></script>
  <script src="script.js"></script>
</body>
</html>

Playground

Change values, colours and text with the controls and watch the animation respond live. Or write in the code yourself. Then download the folder with your changes.

24 values to change

Or ask your AI assistant for it

With the Animorio connector, Claude Code, ChatGPT, Cursor or VS Code take it from here, guide included, and fit it into your project. Paste this request:

Take “Drifting card wall” from Animorio and fit it into my site
Platform licenseFree on your sites and your clients’ sites. Want it inside a website builder, a template platform or a client dashboard? There’s a license for agencies and platforms.

What it does

On light paper there is the opening of Driftboard, an invented design tool: the New pill with Auto layout, now with springs, the big headline Every screen, in one place, a line of explanation, the dark Start designing button and the note Free for two editors. Behind the words there is a wall of eight columns of small white cards, tilted back and turned to one side: cards with revenue and bars, with active users and a curve, with toggles, with the Publish and Cancel buttons, with the brand colour palette, with the team’s avatars, with a search field and its caret, with the onboarding ring and with a picture. The columns drift slowly, one up and the next down, each at its own pace, and the wall fades towards the edges; a light veil keeps the centre clean under the headline. On arrival the wall rises from below as it straightens, and the columns start fast and slow down to their pace, while the words of the headline rise from their masks one after another. Moving the pointer onto a card, its column slows down almost to a stop (and the ones beside it a little), and the card lifts and grows a touch with a soft violet border and a deeper shadow; leaving it, it settles back with an elastic. The button nudges its arrow on hover and, when pressed, sends a wave through the wall: every column speeds up for a moment and then settles. If nobody moves the pointer, a drawn one circles around the headline and lifts the cards on its way.

How it works

The wall in perspective

The wall is a row of columns in a container with perspective, tilted with rotationX and turned with rotationZ by GSAP. The cards are not enlarged with scale (the text would turn jagged): their width is computed from the window, so that the wall covers the screen even when tilted.

Endless columns

Each column has its cards twice in a row. An offset grows on every frame with the column’s pace, and the column moves by the remainder of that offset divided by half its height: when the first half has gone out, the second is exactly in its place and the loop cannot be seen.

The slowdown

On every frame elementFromPoint tells which card is under the pointer. Its column aims at 1 and the ones beside it at 0.4; the real value chases the aim by a small fraction per frame, and the column’s speed is multiplied by 1 minus SLOW times that value, so it slows down and starts again softly.

The card that lifts

The card under the pointer rises and grows a little with back.out, takes the class with the violet border and the deeper shadow, and when the pointer leaves it goes back with elastic.out. The light veil in the centre and the headline let the pointer through, so the cards behind the headline lift too.

Values to change

NameFileDefaultWhat it changes
COLSscript.js8How many columns of cards the wall has.
SPEEDscript.js22How many pixels per second a column drifts (0 stops them).
TILTscript.js34How many degrees the wall is tilted back.
TWISTscript.js16How many degrees the wall is turned to the side.
SLOWscript.js0.85How much the column under the pointer slows down (1 stops it).
LIFTscript.js22How much the card under the pointer lifts and grows.
ACCENTscript.js#5b5bf0The accent colour of the cards.
AUTO_PILOTscript.js2.5After how many seconds without a pointer the drawn one moves (0 never).

Try them in the Playground

When to use it

As the background of the first screen of a product with many screens to show: a design tool, a component library, a dashboard app, a website builder. The wall says «look how much is in here» without stealing the scene from the headline.

On phones

The same wall at adapted sizes: the card width is computed from the longer side, so on a phone the cards are small and the wall covers the whole screen; the headline goes on two smaller lines. A finger touching a card slows its column and lifts the card.

With reduced motion

The wall stays still, like a photo: no drifting, no rising words and no drawn pointer. Everything fades in, and the card under the pointer only gets the border and the shadow.

Pitfalls

  • A wall enlarged with scale makes the text and lines of the cards jagged: the size goes into the card width (a CSS variable) and the wall stays at scale 1.
  • A column with overflow: hidden flattens the 3D of its children: the card under the pointer lifts with y and scale, not with z.
  • The endless loop needs half the height to include the gap between the two copies: (height + gap) divided by two, with no padding in the column, or the seam jumps.

Libraries

GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.

Compressed with gzip, the three demo files weigh 7.4 KB; the libraries: GSAP 28 KB.

Testing

Tested on 28 October 2026

  • Desktop: Done
  • Phone: Done
  • Reduced motion: Done
  • Safari on iPhone: To do

License

Use it in your own projects and in your clients’ projects. Do not resell it or redistribute it as is. GSAP stays under its own Standard license. Full license.

All animations