Skip to content
animorio
IT
Back to the library

Free trial timeline

SVG, HoverGSAP, CSS onlyEasyCompressed weight: Demo 5.0 KBGSAP 28 KBFreeDownload the zip

The ‘how your free trial works’ block of a pricing page: a line with three moments, today, the reminder and the first payment. A light runs along the line with a label counting the days; when the day reaches a moment, its tile lights up on a spring and the sentence below changes. Tapping a moment takes the day there.

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>
<!--
  "Free trial timeline" 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>Free trial timeline with three moments that light up</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 "how your free trial works" block of a pricing page: a line with three moments (today, the reminder, the
         first payment); a light runs along it with a chip that counts the days, each moment lights up on a spring
         when the day reaches it and the sentence below changes; tapping a moment takes the day there -->
    <section class="card" data-card aria-label="How your free trial works">
      <span class="card__halo" aria-hidden="true"></span>
      <header class="head">
        <p class="head__brand">Lumen Notes Pro</p>
        <h1 class="head__title">How your free trial works</h1>
      </header>

      <div class="rail" data-rail>
        <span class="rail__line" aria-hidden="true"><span class="rail__fill" data-fill></span><span class="rail__glow" data-glow></span></span>
        <span class="chip" data-chip aria-hidden="true"><span class="chip__in">Day <b data-day>1</b></span></span>

        <button class="stop" type="button" data-stop data-day-at="0" style="--at: 0">
          <span class="stop__tile" data-tile><svg viewBox="0 0 24 24" aria-hidden="true"><rect x="5.5" y="11" width="13" height="9" rx="2.6"></rect><path d="M8.6 11V8.2a3.4 3.4 0 0 1 6.5-1.4"></path></svg></span>
          <span class="stop__name">Today</span>
        </button>
        <button class="stop" type="button" data-stop data-day-at="11" style="--at: 0.7857">
          <span class="stop__tile" data-tile><svg viewBox="0 0 24 24" aria-hidden="true"><path d="M6.4 16.4V11a5.6 5.6 0 0 1 11.2 0v5.4l1.6 2H4.8Z"></path><path d="M10 20.6a2.2 2.2 0 0 0 4 0"></path></svg></span>
          <span class="stop__name">Day 11</span>
        </button>
        <button class="stop" type="button" data-stop data-day-at="14" style="--at: 1">
          <span class="stop__tile" data-tile><svg viewBox="0 0 24 24" aria-hidden="true"><rect x="3.6" y="6" width="16.8" height="12" rx="2.8"></rect><path d="M3.6 10.4h16.8M7 14.6h3.4"></path></svg></span>
          <span class="stop__name">Day 14</span>
        </button>
      </div>

      <div class="say">
        <p class="say__title"><span data-say-title>Full access starts</span></p>
        <p class="say__text"><span data-say-text>Everything in Pro is open from the first minute. No charge today.</span></p>
      </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.

20 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 “Free trial timeline” 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 middle, on a very light lavender background, a white card with a violet halo in the corner: the product name and the title ‘How your free trial works’. Below, a grey line with three tiles: an open lock above ‘Today’, a bell above ‘Day 11’, a card above ‘Day 14’. The first is already lit, violet with a white icon. Above the line a dark label with a tip says ‘Day 1’. After a moment the line fills with violet from the left, with a soft light at its head, and the label follows it counting the days. On day 11 the bell’s tile snaps: it grows, tilts slightly and comes back on a spring, turns violet, and below the title and the sentence roll to ‘We send you a reminder’. The line stops for a moment and goes on; on day 14 the card lights up and the sentence says what it costs and that you can cancel before. Then the day goes back to 1 and the tiles go out. Hovering an unlit tile its edge turns violet; tapping it, the day runs there and the demo stops on that moment.

How it works

One number

Everything depends on one number, the day, from 0 to DAYS. paint reads it and writes: the horizontal scale of the filled line, the position of the label and the light, the day shown, which tiles are lit, which sentence is read.

The tiles on their day

Each tile has data-day-at; its position is a CSS variable, its day divided by DAYS. When the number passes that day the tile takes the is-on class and GSAP gives it the kick: scale 1.2, rotation of minus 6 degrees, return with elastic.out.

The loop

A timeline takes the day to the second tile at SPEED days a second, stops for STAY seconds, goes to the third, stops a little longer and returns to zero in nine tenths of a second.

The sentences

Title and sentence sit in two boxes as tall as their lines with overflow hidden: the old text leaves upwards and the new one comes in from below, without changing the card’s height.

Values to change

NameFileDefaultWhat it changes
DAYSscript.js14How many days the trial lasts.
SPEEDscript.js3.2How many days pass in a second.
STAYscript.js1.1How many seconds the line stops on each moment.
POPscript.js0.8How long the spring of the moment lighting up lasts, in seconds.
ACCENTscript.js#5a57f2The colour of the line and the lit moments.
ACCENT2script.js#9f7bffThe line’s second colour.
LOOPscript.jstrueLeft alone, the trial runs and starts again.

Try them in the Playground

When to use it

For the pricing page or the paywall of a subscription app: saying clearly when the trial starts, when the reminder comes and when you pay removes the fear of a surprise charge. It suits any three-step process with dates: a shipment, an enrolment, a booking.

On phones

The same card, as wide as the screen: the tiles are a little smaller and the line stays horizontal, with the last two tiles close but apart.

With reduced motion

The line does not run: the day goes straight from one moment to the next, the tiles change colour without kicks and the sentences change with a fade.

Pitfalls

  • The last two steps are close (day 11 and 14 out of 14): under 340 pixels of width the tiles must shrink or they touch.
  • The longest sentence decides the height of the text box: keep it to two lines on a phone too, or the card changes height at every step.
  • The promises written here (reminder, no charge today) must be true in the product: the text is an example.

Libraries

GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.

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

Testing

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