Skip to content
animorio
IT
Back to the library

Fanned pricing plans

Physics, HoverGSAP, CSS onlyMediumCompressed weight: Demo 12 KBGSAP 28 KBFreeDownload the zip

The five memberships of a made-up sports club, Second Wind Club, fanned out like a deck of cards: the middle one straight and sharp, the others smaller and leaning on both sides. Drag the deck with a finger or the mouse and every card follows it live; let go past a tenth of the width and the next card takes the middle on an elastic spring, otherwise the deck springs back. Each card has its own pair of colours and the page takes the pair of the card in the middle; the price rolls digit by digit, the edge catches the light, the shadow follows the lean and a synthesised paper swipe goes with every change.

Rebuilt from scratch studying champions4good.club by Double Play: the idea is theirs; code, copy and images are ours. Read how it’s made

The code

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

<!doctype html>
<!--
  "Fanned pricing plans" 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>Second Wind Club, memberships</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>
  <main class="stage" data-stage>
    <!-- the five memberships of a made-up sports club, Second Wind Club, dealt as a fan of cards. The one in the middle
         stands straight and sharp, the others lean back smaller on both sides. The whole deck follows the finger while
         you drag, and lets go on an elastic spring; the page takes the colours of the card in the middle -->
    <header class="head">
      <span class="brand">
        <svg class="brand__mark" viewBox="0 0 24 24" aria-hidden="true">
          <path d="M4 15.5c2.6-6.4 8.8-9.6 16-8.4"/>
          <path d="M4 19c3.2-4.6 8-6.8 14.4-6.4"/>
        </svg>
        <span>Second Wind Club</span>
      </span>
      <button class="sound" type="button" aria-pressed="true" aria-label="Card sound" data-sound>
        <svg viewBox="0 0 20 20" aria-hidden="true">
          <path class="sound__body" d="M3.5 7.6h2.6l3.8-3.1v11l-3.8-3.1H3.5z"/>
          <path class="sound__wave sound__wave--a" d="M12.6 7.4a3.6 3.6 0 0 1 0 5.2"/>
          <path class="sound__wave sound__wave--b" d="M14.8 5.2a6.7 6.7 0 0 1 0 9.6"/>
          <path class="sound__off" d="M12.4 7.6l4.8 4.8M17.2 7.6l-4.8 4.8"/>
        </svg>
        <span class="sound__words">Sound</span>
      </button>
    </header>

    <section class="deck" tabindex="0" role="group" aria-roledescription="carousel" aria-label="Club memberships, drag or use the arrow keys" data-deck>
      <!-- the cards are filled in by script.js from PLANS -->
    </section>

    <nav class="bar" aria-label="Choose a membership">
      <button class="arrow" type="button" aria-label="Previous membership" data-prev>
        <svg viewBox="0 0 20 20" aria-hidden="true"><path d="M15.5 10H5M9.2 5.6 4.8 10l4.4 4.4"/></svg>
      </button>
      <p class="hint" aria-hidden="true">
        <svg class="hint__hand" viewBox="0 0 28 14"><path d="M2 7h24M6 3.2 2 7l4 3.8M22 3.2 26 7l-4 3.8"/></svg>
        <span>Drag the deck</span>
      </p>
      <button class="arrow" type="button" aria-label="Next membership" data-next>
        <svg viewBox="0 0 20 20" aria-hidden="true"><path d="M4.5 10H15M10.8 5.6l4.4 4.4-4.4 4.4"/></svg>
      </button>
    </nav>
    <p class="sr" aria-live="polite" data-live></p>
  </main>

  <template data-card-template>
    <article class="card" data-card>
      <div class="card__lift" data-lift>
        <span class="card__shadow" aria-hidden="true" data-shadow></span>
        <div class="card__body">
          <span class="card__grain" aria-hidden="true"></span>
          <svg class="card__track" viewBox="0 0 200 120" preserveAspectRatio="xMidYMid slice" aria-hidden="true" data-track></svg>
          <span class="card__sheen" aria-hidden="true"><span class="card__sheen-band" data-sheen></span></span>
          <span class="card__edge" aria-hidden="true"></span>
          <header class="card__top">
            <span class="card__club">
              <svg viewBox="0 0 24 24" aria-hidden="true"><path d="M4 15.5c2.6-6.4 8.8-9.6 16-8.4"/><path d="M4 19c3.2-4.6 8-6.8 14.4-6.4"/></svg>
              <span>Membership</span>
            </span>
            <span class="card__term" data-term></span>
          </header>
          <div class="card__mid">
            <h2 class="card__name" data-name></h2>
            <p class="card__for" data-for></p>
            <ul class="card__perks" data-perks></ul>
          </div>
          <footer class="card__foot">
            <p class="card__price"><span class="card__from" data-from></span><span class="card__figure" data-figure></span><span class="card__per">/ year</span></p>
            <button class="join" type="button" tabindex="-1" data-join>
              <span class="join__bg" aria-hidden="true"></span>
              <span class="join__words">Join</span>
              <svg class="join__arrow" viewBox="0 0 14 14" aria-hidden="true"><path d="M2.5 7h8.4M7.4 3.3 11.1 7l-3.7 3.7"/></svg>
            </button>
          </footer>
        </div>
      </div>
    </article>
  </template>

  <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.

26 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 “Fanned pricing plans” 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 a dark ground with a soft light in the middle, the Second Wind Club mark at the top (two crescent trails) and the Sound switch; at the bottom two round arrows and the words ‘Drag the deck’. In between, five tall cards, 2:3, fanned out: Athlete (free, violet and lilac), Pacer (960 euros a year, petrol and mint), Team (1,840 euros, umber and amber, ‘Popular’), League (3,600 euros, chalk and soot) and Patron (from 6,000 euros, lilac and violet). Each has the grain of card stock, a one pixel edge catching the light from the top left, the lanes of a running track drawn thin (the plan's lane thicker), the name in a very narrow Mona Sans, a line on who it is for, three perks with a tick, the price on reels and a ‘Join’ button with an arrow. At first the deck opens out from the middle on a spring; then, until someone touches it, an invisible hand leans the deck a third of the way and lets go: the next card reaches the middle on the elastic, the price rolls from the old one to the new one digit by digit, the button comes in squashed and turned 5 degrees and straightens, the plan's lane draws itself and the perks rise in a cascade. Meanwhile the page turns from the colour of the card leaving to the one arriving. The side cards are a little blurred and darker, their shadow slides the way they lean and a soft sheen crosses every card as it travels. While you drag, every card mixes its place with the next one in real time; past half the width the deck resists. A click on a side card brings it to the middle, the arrows and the left and right keys do the same. After the first touch every change makes a short paper swipe, which the switch turns off.

How it works

A place for every distance from the middle

Every card has a distance from the middle, d = i − pos, wrapped on a circle of five. At 0 it stands straight; at 1 it moves 35 % of its width across, 4 % down, turns 10 degrees and scales to 0.925; at 2 60 %, 10 %, 18 degrees and 0.85: the site's numbers. Between two places the values mix in a straight line, and past 2 the card fades toward a hidden place, so it leaves on one side and comes back on the other.

The whole deck follows the finger

pos is a single number. While dragging, pos = starting pos − x / width: all the cards mix together between the place they hold and the next one, like the gsap.set in the site's onDrag. Past half the width x takes only a fifth of the gesture, like Draggable's edgeResistance 0.8.

The threshold, the spring and the click

On release, if x is past 10 % of the width the card before or after comes, otherwise the deck springs back: a tween of pos with elastic.out(1, 1) in 0.6 s. Under 4 pixels the gesture is a click: document.elementFromPoint finds the card under the finger and, if it is a side card, brings it to the middle the shorter way.

The page, the light and the shadow

At every frame the colour of the page and its ink are mixed between the two cards closest to the middle. From the lean come the angle of the edge gradient (the light stays at the top left), the shift of the blurred shadow under the card and the place of the sheen; from the distance to the middle the blur and the brightness.

The rolling price and the swipe

Every digit is a window over a strip of 0-9 twice: it starts from the digit of the previous card, aligned right, and always rolls forward. The swipe is white noise through a band pass filter rising from 1,400 to 3,800 Hz in 0.12 s, plus a high tick at the end; the AudioContext is born only on the first real gesture, with a 50 ms debounce like the site.

Values to change

NameFileDefaultWhat it changes
NEAR_Xscript.js35How far the cards next to the middle move across, in % of the width (the site uses 35).
NEAR_Yscript.js4How far down they sit, in % of the height.
NEAR_TILTscript.js10How many degrees they lean.
NEAR_SCALEscript.js0.925How big they are next to the middle.
FAR_Xscript.js60The same for the outer cards: across.
FAR_Yscript.js10Down.
FAR_TILTscript.js18The lean.
FAR_SCALEscript.js0.85The size.
THRESHOLDscript.js0.1How far to drag, as a share of the width, before the next card comes (the site uses 0.1).
SNAPscript.js0.6Seconds of the spring on release.
SPRINGscript.js1How far the spring overshoots: the amplitude of elastic.out.
CLICK_PXscript.js4Under this many pixels the gesture is a click.
AUTO_EVERYscript.js2.6Left alone, seconds between one card and the next.
SOUNDscript.jstrueThe paper swipe at every change, after the first touch.
LOOPscript.jstrueLeft alone, the deck deals itself.

Try them in the Playground

When to use it

For the pricing page of a club, a gym, a subscription or an app with several plans: when the plans are few and each has a character, and choosing should feel like going through a deck rather than reading a table. It also works for event tickets or tiered passes.

On phones

The same animation with adapted sizes: the cards are measured on the width and the height, so the whole fan always fits the screen; on narrow cards the perks hide and the name, line, price and button stay. The deck is dragged sideways with the finger, the page's vertical scroll stays free.

With reduced motion

The fan is already open and does not move: on a change, with the arrows, the keyboard, a click or a drag past the threshold, the deck fades and comes back with the new card in the middle; the price changes without rolling and the page colours change with it.

Pitfalls

  • With five cards and fan places for each, the card going from +2 to −2 would cross the whole deck in front of the others: the site asks for at least seven cards and duplicates the plans. Here a single number, pos, and a hidden place halfway round the circle where the card fades: it leaves on one side and comes back on the other.
  • Dragging must not trap the finger on the deck: touch-action pan-y lets the page scroll vertically, and pointercancel (when the browser takes the gesture) puts the deck back.
  • The cqw sizes inside the card: container-type goes on a parent of the card, because an element does not measure itself and the cqw fall back to the screen (the corners get huge).
  • The digit reel must always roll forward: when the new digit is smaller it lands on the second run and a set brings it back to the first at the end, where it looks the same.
  • Audio only after a real gesture: the pilot does not count, so the check is on event.isTrusted and the AudioContext is born there.

Libraries

GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.

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

Testing

Tested on 7 November 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