Skip to content
animorio
IT
Back to the library

Scroll trip itinerary

ScrollGSAP, CSS onlyMediumCompressed weight: Demo 10 KBGSAP + ScrollTrigger 45 KBLenis 5.3 KBFreeDownload the zip

Scroll inside the preview

A scroll animation in the premium style of product pieces: the dark glass card of a made-up travel app, Wayfare, with the itinerary of a weekend in Lisbon. Scrolling down, an apricot line runs along the route and every stop it reaches builds itself out of its dashed placeholder: the icon tile lights up on a spring, the row fills and a sheen crosses it, the name and the counting price come in. The day tabs follow the line, the total adds up and at the end the button books the trip.

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>
<!--
  "Scroll trip itinerary" 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>Wayfare trip itinerary</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 itinerary of a weekend in Lisbon in a made-up travel app, Wayfare, on a dark glass card. The stage sticks
       while you scroll and the scroll is the trip: a warm line runs down the route and every stop it reaches builds
       itself out of its placeholder (the icon tile lights up on a spring, the row fills, the words come in, the price
       counts up). The day tabs follow the line, the total adds up in the foot, and at the end the trip is booked. -->
  <main>
    <section class="trip" data-trip>
      <div class="stage" data-stage>
        <div class="light light--a" data-light-a aria-hidden="true"></div>
        <div class="light light--b" data-light-b aria-hidden="true"></div>
        <div class="grain" aria-hidden="true"></div>

        <div class="frame" data-frame>
          <article class="card" data-card>
            <span class="card__edge" aria-hidden="true"></span>
            <span class="card__glow" aria-hidden="true"></span>

            <header class="head">
              <span class="head__mark" aria-hidden="true">
                <svg viewBox="0 0 16 16"><path d="M2.8 11.6c1.6-4.6 8.8-4.6 10.4 0"/><path d="M5.6 5.2 8 2.8l2.4 2.4"/><path d="M8 2.8v5.6"/></svg>
              </span>
              <div class="head__text">
                <p class="head__title">Lisbon weekend</p>
                <p class="muted">Jun 12 &ndash; 14 &middot; 2 travellers</p>
              </div>
              <span class="chip"><span class="chip__num" data-count>0</span>&nbsp;<span data-count-word>stops</span></span>
            </header>

            <div class="days" data-days aria-hidden="true">
              <span class="days__ind" data-ind></span>
              <span class="days__tab is-on" data-tab>Fri 12</span>
              <span class="days__tab" data-tab>Sat 13</span>
              <span class="days__tab" data-tab>Sun 14</span>
            </div>

            <div class="route" data-route>
              <span class="route__track" aria-hidden="true"><span class="route__fill" data-fill></span></span>

              <ol class="stops">
                <li class="stop" data-stop data-day="0" data-price="312">
                  <span class="stop__tile" data-tile><i><svg viewBox="0 0 16 16"><path d="M8 1.8c.6 0 1 .5 1 1.1v3.6l4.8 2.8v1.4L9 9.3v2.6l1.6 1.2v1.1L8 13.5l-2.6.7v-1.1L7 11.9V9.3l-4.8 1.4V9.3L7 6.5V2.9c0-.6.4-1.1 1-1.1z"/></svg></i></span>
                  <div class="stop__face" data-face>
                    <span class="stop__ghost" data-ghost aria-hidden="true"><i></i><i></i></span>
                    <span class="stop__sheen" data-sheen aria-hidden="true"></span>
                    <span class="stop__text" data-text><b>Flight WF 214</b><small>Fri 09:40 &middot; London to Lisbon &middot; 2h 35m</small></span>
                    <span class="stop__price" data-p>&euro;0</span>
                  </div>
                </li>
                <li class="stop" data-stop data-day="0" data-price="486">
                  <span class="stop__tile" data-tile><i><svg viewBox="0 0 16 16"><path d="M2 12.6V3.8"/><path d="M2 9.4h12v3.2"/><path d="M14 9.4V8c0-1-.8-1.8-1.8-1.8H7.6v3.2"/><circle cx="4.7" cy="7.6" r="1.3"/></svg></i></span>
                  <div class="stop__face" data-face>
                    <span class="stop__ghost" data-ghost aria-hidden="true"><i></i><i></i></span>
                    <span class="stop__sheen" data-sheen aria-hidden="true"></span>
                    <span class="stop__text" data-text><b>Casa do P&aacute;tio</b><small>Fri 15:00 &middot; Check-in &middot; 3 nights</small></span>
                    <span class="stop__price" data-p>&euro;0</span>
                  </div>
                </li>
                <li class="stop" data-stop data-day="1" data-price="12">
                  <span class="stop__tile" data-tile><i><svg viewBox="0 0 16 16"><rect x="3" y="4.4" width="10" height="8" rx="1.8"/><path d="M3 8.4h10"/><path d="M5.6 12.4l-1 1.8"/><path d="M10.4 12.4l1 1.8"/><path d="M8 4.4V2.2"/><path d="M6 2.2h4"/></svg></i></span>
                  <div class="stop__face" data-face>
                    <span class="stop__ghost" data-ghost aria-hidden="true"><i></i><i></i></span>
                    <span class="stop__sheen" data-sheen aria-hidden="true"></span>
                    <span class="stop__text" data-text><b>Tram up to Gra&ccedil;a</b><small>Sat 10:00 &middot; 22 min &middot; 2 passes</small></span>
                    <span class="stop__price" data-p>&euro;0</span>
                  </div>
                </li>
                <li class="stop" data-stop data-day="1" data-price="58">
                  <span class="stop__tile" data-tile><i><svg viewBox="0 0 16 16"><path d="M4.4 2v4a1.6 1.6 0 0 0 3.2 0V2"/><path d="M6 2v12"/><path d="M11.6 14V2c-1.4.6-2.2 2-2.2 3.8v3.2h2.2"/></svg></i></span>
                  <div class="stop__face" data-face>
                    <span class="stop__ghost" data-ghost aria-hidden="true"><i></i><i></i></span>
                    <span class="stop__sheen" data-sheen aria-hidden="true"></span>
                    <span class="stop__text" data-text><b>Lunch at Tasca Ribeira</b><small>Sat 13:30 &middot; Table for 2</small></span>
                    <span class="stop__price" data-p>&euro;0</span>
                  </div>
                </li>
                <li class="stop" data-stop data-day="2" data-price="24">
                  <span class="stop__tile" data-tile><i><svg viewBox="0 0 16 16"><path d="M2.4 4.6h11.2v2a1.5 1.5 0 0 0 0 3v2H2.4v-2a1.5 1.5 0 0 0 0-3z"/><path d="M9.8 4.8v1.2M9.8 7.4v1.2M9.8 10v1.2"/></svg></i></span>
                  <div class="stop__face" data-face>
                    <span class="stop__ghost" data-ghost aria-hidden="true"><i></i><i></i></span>
                    <span class="stop__sheen" data-sheen aria-hidden="true"></span>
                    <span class="stop__text" data-text><b>Tile museum</b><small>Sun 11:00 &middot; 2 tickets</small></span>
                    <span class="stop__price" data-p>&euro;0</span>
                  </div>
                </li>
                <li class="stop" data-stop data-day="2" data-price="392">
                  <span class="stop__tile" data-tile><i><svg viewBox="0 0 16 16" style="transform: rotate(180deg)"><path d="M8 1.8c.6 0 1 .5 1 1.1v3.6l4.8 2.8v1.4L9 9.3v2.6l1.6 1.2v1.1L8 13.5l-2.6.7v-1.1L7 11.9V9.3l-4.8 1.4V9.3L7 6.5V2.9c0-.6.4-1.1 1-1.1z"/></svg></i></span>
                  <div class="stop__face" data-face>
                    <span class="stop__ghost" data-ghost aria-hidden="true"><i></i><i></i></span>
                    <span class="stop__sheen" data-sheen aria-hidden="true"></span>
                    <span class="stop__text" data-text><b>Flight WF 219</b><small>Sun 18:20 &middot; Lisbon to London &middot; 2h 40m</small></span>
                    <span class="stop__price" data-p>&euro;0</span>
                  </div>
                </li>
              </ol>
            </div>

            <footer class="foot">
              <p class="foot__sum"><b data-sum>&euro;0</b><span class="muted">for 2, all in</span></p>
              <button class="btn" type="button" data-btn aria-pressed="false">
                <span class="btn__fill" data-btn-fill aria-hidden="true"></span>
                <span class="btn__shine" data-btn-shine aria-hidden="true"></span>
                <span class="btn__face">
                  <svg class="btn__icon" viewBox="0 0 16 16" aria-hidden="true">
                    <g data-ticket><path d="M2.4 4.6h11.2v2a1.5 1.5 0 0 0 0 3v2H2.4v-2a1.5 1.5 0 0 0 0-3z"/><path d="M9.8 4.8v1.2M9.8 7.4v1.2M9.8 10v1.2"/></g>
                    <circle class="btn__spin" data-spin cx="8" cy="8" r="5.4" pathLength="1"/>
                    <path class="btn__check" data-check pathLength="1" d="M3.4 8.4l3 3 6.2-6.6"/>
                  </svg>
                  <span class="btn__words" data-btn-words>Book trip</span>
                </span>
              </button>
            </footer>
          </article>
        </div>
      </div>
    </section>
    <p class="sr" aria-live="polite" data-live></p>
  </main>

  <script src="https://cdn.jsdelivr.net/npm/gsap@3.15.0/dist/gsap.min.js"></script>
  <script src="https://cdn.jsdelivr.net/npm/gsap@3.15.0/dist/ScrollTrigger.min.js"></script>
  <script src="https://cdn.jsdelivr.net/npm/lenis@1.3.26/dist/lenis.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.

44 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 “Scroll trip itinerary” 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 an almost black page, with two soft lights behind, apricot at the top left and teal at the bottom right, a dark glass card rises with layered shadows and a thread of light on its top edge. At the top the Wayfare mark in a small apricot square, ‘Lisbon weekend’, ‘Jun 12 – 14 · 2 travellers’ and the label with the number of stops; under it, three tabs for the days, ‘Fri 12’, ‘Sat 13’, ‘Sun 14’, in a sunken track. Then the route: on the left a dashed line with six dark tiles for the icons (plane, bed, tram, fork and knife, ticket, return plane), on the right six rows still empty, only a thin border and two grey bars. Scrolling down, the line fills with apricot from the top, and when it reaches a stop the icon tile lights up and pops a little past its size before it settles, the bars leave, a sheen crosses the row, the name and the time come in from the left (‘Flight WF 214’, ‘Casa do Pátio’, ‘Tram up to Graça’, ‘Lunch at Tasca Ribeira’, ‘Tile museum’, ‘Flight WF 219’) and the price counts up from zero. The last stop reached lifts by a pixel and takes a warm ring. When the line moves on to the next day, the tab indicator slides on a spring and stretches for a moment the way it goes. At the top the number of stops goes up, at the bottom the total counts to ‘€1,284’. At the end the ‘Book trip’ button gives under the finger, the ticket makes way for a turning arc, ‘Booking’, then it fills with apricot from the left, a flash of light crosses it and the arc becomes a checkmark: ‘Trip booked’. Scrolling back, every stop turns back into a placeholder. With the pointer a soft light follows it on the card, the rows lift and the button can be pressed.

How it works

The share of the trip done

The scroll drives a single GSAP timeline with ScrollTrigger and scrub: it carries a number from 0 to 1, the share of the route done. On every update the number becomes the route's --p variable, and the filled line is a scaleY(var(--p)): no pixels to recompute.

Stops at equal distance

The six rows sit in a grid of six equal rows, so stop i is reached when --p passes i / 5, and the line runs from the centre of the first tile to the centre of the last (a twelfth of the height above and below).

Compose on a spring, not on the scrub

The scroll only decides when a stop is there; the rest is a small timed timeline: the tile with a back.out that passes its size, the placeholder leaving, the sheen crossing the row with xPercent, the text with a blur that clears and the price counting up. Going back up, the same in reverse and quicker.

The day indicator

The indicator is a third of the track wide and GSAP moves it with xPercent (0, 100, 200), on a spring; at the same moment a small scaleX with its origin on the side it leaves from stretches it the way it goes.

The three states of the button

Two thresholds on the timeline: first ‘Booking’, with the ticket making way for an arc that turns with svgOrigin, then ‘Trip booked’, with the fill growing with scaleX, a flash with xPercent and the checkmark drawn with strokeDashoffset on pathLength 1. Pressed by hand it runs the same steps on a timer.

Values to change

NameFileDefaultWhat it changes
RIDEscript.js1How much scroll the whole trip takes: 2 is twice as long.
POPscript.js0.7The seconds a stop takes to build itself.
BOUNCEscript.js2.2How far the icon tile passes its size before it settles: 0 none.
SLIDEscript.js14The pixels the words of a stop slide in from.
LIFTscript.js1How much the last stop reached lifts and warms: 0 never.
GLOWscript.js1How strong the two lights behind the card are.

Try them in the Playground

When to use it

For the landing page of a travel app, an agency, a booking site or a hotel selling packages: the section that tells how the app puts the trip together, stop by stop, and ends on the button to book it.

On phones

The same animation with adapted sizes: the rows, the tiles, the tabs and the button are sized on the height too and the whole card fits in the box; the long details under the names shorten with an ellipsis and under 360 pixels wide the words under the total go away.

With reduced motion

No long scroll and no movement: the card fades in with the itinerary already built, the line full to the end, Sunday chosen and the total already counted; the button changes with a fade.

Pitfalls

  • If the scrub drove the stops' entrance too, the tile's spring would never show: the scroll only decides when a stop is there, and its entrance is a timed timeline that can also run backwards.
  • GSAP does not read percentages back from the CSS: the line is a scaleY of the --p variable and the day indicator moves with xPercent, so no pixel size needs recomputing when the window changes height.
  • The lift of the stop reached goes on the outer row, the hover on the inner face; the tile's pop on its wrapper, the colours on the square inside: otherwise GSAP's inline transform wipes out the CSS one.

Libraries

GSAP 3.15.0, ScrollTrigger 3.15.0, Lenis 1.3.26, Mona Sans (font variabile) 5.3.0.

Compressed with gzip, the three demo files weigh 10 KB; the libraries: GSAP + ScrollTrigger 45 KB, Lenis 5.3 KB.

Testing

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