Skip to content
animorio
IT
All components

Festival shuttle card

Cards, Hover, SVGGSAP, CSS onlyMediumCompressed weight: Demo 5.3 KBGSAP 28 KBFreeDownload the zip

A festival’s shuttle in a card: a large number says in how many minutes it reaches your stop, and below it the green line with its four stops and the minibus running along it, stopping at each. Choosing another stop the count is worked out again and rolls to the new number; when the minibus reaches yours, the number turns green and the line says boarding is now.

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 shuttle card" 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>Festival shuttle card with the next ride counting down and the stops on the line</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 shuttle of a festival: the bus runs along the line and waits at each stop; the big number says in how
         many minutes it reaches your stop, and choosing another stop the count is worked out again -->
    <article class="bus" data-bus>
      <header class="bus__head">
        <div><span class="bus__line">Green line</span><h1>Shuttle to the gates</h1></div>
        <p class="bus__seats"><strong class="roll"><span data-seats>14</span></strong><span>seats left</span></p>
      </header>

      <p class="eta" aria-hidden="true"><strong class="roll roll--big"><span data-eta>6</span></strong><span class="eta__side"><span class="roll"><span data-unit>min</span></span><span class="roll eta__to"><span data-to>to Camping</span></span></span></p>

      <div class="route">
        <span class="route__road" aria-hidden="true"></span>
        <span class="route__done" data-done aria-hidden="true"></span>
        <span class="route__van" data-van aria-hidden="true"><svg viewBox="0 0 34 20"><rect class="van__body" x="1" y="2.5" width="32" height="13" rx="4.5"></rect><rect class="van__glass" x="4.4" y="5.2" width="6.6" height="5" rx="1.4"></rect><rect class="van__glass" x="12.6" y="5.2" width="6.6" height="5" rx="1.4"></rect><rect class="van__glass" x="20.8" y="5.2" width="8.6" height="5" rx="1.4"></rect><rect class="van__wheel" x="6" y="14" width="5.4" height="4.4" rx="2.2"></rect><rect class="van__wheel" x="22.600" y="14" width="5.4" height="4.4" rx="2.2"></rect></svg></span>
        <div class="route__stops" role="radiogroup" aria-label="Your stop" data-stops></div>
      </div>
    </article>
    <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.

18 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 shuttle card” 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

In the centre, on white, a card with rounded corners: at the top the line’s tag (“Green line”), the title “Shuttle to the gates” and on the right the seats left. Below, a large number with the minutes and next to it “min” and the chosen stop (“to Camping”). At the bottom the line: a grey strip with four stops marked by upright bars and their names, the part already covered in green and a green minibus sliding from one stop to the next, slowing on arrival, and waiting a moment at each. The number drops as the minibus nears your stop; when it gets there it becomes a green 0, “min” rolls to “now”, the line below says “boarding at Camping”, the minibus gives a little hop and the seats left go down. At the end of the line the minibus fades and another comes in from the start. Touching another stop, it lights up and minutes and labels are rewritten for it.

How it works

One timeline, the whole run

The run is a single repeating GSAP timeline: for each stop a tween of the position (power1.inOut, RIDE seconds) and a wait of WAIT seconds. While it is built, the script notes the arrival time at each stop.

The minutes

On every frame the minutes to your stop are the arrival time minus the timeline’s time (plus one lap, if the minibus has already passed), divided by RIDE and multiplied by MINUTES. The number rolls only when it really changes.

The minibus and the line

The position is a fraction of the line: the minibus has left in percent and the covered part a scaleX equal to the same fraction, so nothing to recalculate on resize. At your stop it gives an elastic hop.

Values to change

NameFileDefaultWhat it changes
RIDEscript.js1.5How many seconds the shuttle takes between one stop and the next.
WAITscript.js0.9How many seconds it waits at each stop.
MINUTESscript.js4How many real minutes one stretch between two stops is worth.
STOPscript.js2Your stop at the start (1 is the first).
SEATSscript.js14The seats left when it leaves.
ACCENTscript.js#12a35cThe colour of the line and of the shuttle.
LOOPscript.jstrueLeft alone, a pointer changes stop.

Try them in the Playground

When to use it

For the site or app of a festival, a fair, a stadium or a holiday resort with a shuttle from the car park or the station, and for a hotel’s or an airport’s shuttle. In a real product the position comes from the vehicle’s GPS and the minutes from the timetable service.

On phones

The same card, at most as wide as the screen minus the margins, with the large number measured on the height too; the stops are touched with a finger.

With reduced motion

No running minibus: it stands at the first stop and the minutes are the ones from there; changing stop, number and labels change in place.

Pitfalls

  • The minutes come from the timeline’s time, not from a second clock: two separate clocks end up saying 2 minutes to go with the minibus already at the stop.
  • The stops are upright bars, not dots, and the chosen one also has a darker name: colour alone is not enough.
  • The first and last stops have their mark aligned to the edge of the line and their name aligned to the side: centred, they would stick out of the card on a phone.

Libraries

GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.

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

Testing

Tested on 15 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 components