Skip to content
animorio
IT
Back to the library

Festival lanyard passes

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

The pass picker of a made-up seaside festival, Lowtide Festival, in the premium style of the interface pieces: three passes (Day, Weekend and VIP) hanging from woven lanyards on a steel rail, with real rope physics. A pointer brushing past sets them swinging; the chosen pass unclips from its carabiner, spins down into the order pocket, bounces and settles, and beside it the total rolls to the new price and Checkout lights up. Picking another one sends the first back up to its lanyard.

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>
<!--
  "Festival lanyard passes" 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>Lowtide Festival, choose your pass</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">
    <!-- the pass picker of a made-up seaside festival, Lowtide. Three passes hang from woven lanyards on a steel rail
         and swing on real ropes when the pointer brushes them; the one you pick unclips from its carabiner, falls with
         a little spin into the order tray, bounces and settles, and the summary beside it rolls to the new price -->
    <section class="card" data-card aria-label="Choose your pass">
      <span class="card__grain" aria-hidden="true"></span>
      <header class="head">
        <div class="head__who">
          <svg class="head__mark" viewBox="0 0 24 24" aria-hidden="true"><circle cx="12" cy="12" r="9.5"></circle><path d="M5.2 13.4c1.6-1.5 3.1-1.5 4.6 0s3.1 1.5 4.6 0 3.1-1.5 4.6 0M6.4 9.6c1.4-1.2 2.6-1.2 4 0"></path></svg>
          <div>
            <p class="head__brand">Lowtide Festival <span class="head__sep">·</span> 18&ndash;20 Jun 2027</p>
            <h1 class="head__title">Choose your pass</h1>
          </div>
        </div>
        <p class="head__chip">Early bird</p>
      </header>

      <div class="scene" data-scene>
        <span class="rail" data-rail aria-hidden="true"><span class="rail__bar"></span></span>
        <svg class="ropes" data-ropes aria-hidden="true"></svg>

        <div class="tray" data-tray>
          <div class="sum sum--left">
            <p class="sum__label">Your pass</p>
            <p class="sum__name"><span data-name>None yet</span></p>
            <p class="sum__note" data-note>Pick from the rail</p>
          </div>
          <div class="pocket" data-pocket aria-hidden="true">
            <span class="pocket__hint" data-hint>Drop here</span>
          </div>
          <div class="sum sum--right">
            <p class="sum__label">Total</p>
            <p class="sum__price"><span data-price>&euro;0</span></p>
            <button class="go" type="button" data-go disabled><span class="go__fill" aria-hidden="true"></span><span class="go__label">Checkout</span></button>
          </div>
        </div>
      </div>
    </section>
    <p class="sr" data-live aria-live="polite"></p>

    <svg class="ghost" data-ghost viewBox="0 0 24 24" aria-hidden="true"><path d="M5 3.2 19.2 11l-6.3 1.6-3.3 5.9Z"></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.

28 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 “Festival lanyard passes” 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 near black ground sits a graphite card with a very fine grain, a 1px edge that catches the light and soft layered shadows: the pass picker of Lowtide Festival, a made-up seaside festival, 18 to 20 June 2027, with a wave mark in an orange circle, the title Choose your pass and the Early bird pill. Below runs a satin steel rail and from three rings hang three woven lanyards, each in its own colour, with a light stitch down the middle and a metal carabiner at the end: the Day pass in bone paper, the orange Weekend and the black VIP with silver lettering whose light shifts as it swings, each with its slot, the festival name, the days, the price and a small barcode. The ropes are real: seven pieces of rope and a rigid pass, moved by gravity. When the pointer brushes them the passes get pushed and swing, the rope bends, and the one under the pointer swells with an orange edge. Tap one and the pass squeezes, the carabiner opens its gate and lets go, the free lanyard gives a little flick, and the pass hops, turns a quarter and falls into the recessed pocket of the summary, bounces off the floor and the walls and settles on its side; the pocket gives a small knock, the pass name slides into place, the total rolls up from zero to the price and Checkout fills with orange from the left. Picking another one lifts the first out of the pocket in an arc and clips it back onto its lanyard, still swinging; tapping the pass in the pocket puts it back and the total returns to zero. Left alone, a drawn pointer brushes the three passes, picks the Weekend, then the VIP, then puts it back.

How it works

Ropes and passes in Verlet

Each lanyard is a row of eight Verlet points, the first one pinned to the ring on the rail; each pass is a rigid rectangle made of four points held by six constraints (the sides and the two diagonals). The carabiner is one more constraint between the last point of the rope and the middle of the pass’s top edge. The step is fixed, 120 per second, inside gsap.ticker: the demo runs the same at any screen refresh rate.

The aimed throw into the pocket

When it unclips, the carabiner constraint goes away and each corner gets a velocity: the one that carries the centre into the pocket, worked out from the fall time under gravity, plus the one of a quarter turn in that same time. The floor and the walls of the pocket push the corners back with a bounce and some friction: the pass settles on its side by itself.

The way back and the summary

To go back up, the pass leaves the physics and GSAP carries it along an arc to the carabiner, which keeps swinging on its own meanwhile; at the end the points keep a little of their velocity and the pass swings again. The total is a number GSAP raises with power3.out, the name comes in from below with a back.out and the Checkout fill widens with scaleX.

Values to change

NameFileDefaultWhat it changes
GRAVITYscript.js2600How hard everything falls, in pixels per second squared.
SWINGscript.js0.55How much the pointer pushes a pass it brushes past.
BOUNCEscript.js0.32How much the chosen pass bounces when it lands in the pocket (0 for none).
SPINscript.js1How much the pass turns while it falls (1: it lands on its side).
DAMPscript.js0.9975How slowly the swing dies out (closer to 1, the longer it swings).
ROLLscript.js0.7How long the total takes to roll to the new price, in seconds.
LOOPscript.jstrueLeft alone, a pointer brushes the passes and picks two of them.
--accentstyle.css#ff7440The orange of the Weekend pass, the mark and Checkout.
--paperstyle.css#ebe6dbThe bone paper of the Day pass.
--pagestyle.css#0b0b0dThe black of the ground.

Try them in the Playground

When to use it

For the tickets page of a festival, a concert or a fair: visitors see the passes at once as real things to take, pick one with a tap and find it in the summary with the price, ready to pay.

On phones

The same animation with adapted measures: the card is sized on width and height together, the passes, lanyards and pocket are worked out again on resize, and on the phone you tap a pass to pick it; dragging a finger over the passes sets them swinging.

With reduced motion

No physics and no movement: the passes hang still, the chosen one fades off its lanyard and fades in at rest in the pocket, and the total simply changes.

Pitfalls

  • At a quarter turn the top edge of the pass is on the right and the body reaches left: the rest pose in the pocket has to be worked out from the centre, not the top edge, or the pass ends up outside the pocket.
  • The pass moved by the ticker rewrites its transform every frame: the swell on hover and the press live on the child .pass__face, in CSS, or they vanish.
  • A narrow pocket wedges a tilted pass against its walls: the physics walls sit a little past the drawn edge, a light hand lays it on its side, a small knock frees it if it stays tilted, and once still it slides to the middle of the pocket.

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