Skip to content
animorio
IT
Back to the library

Article series rail

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

A series of articles in five parts on a personal blog: the parts hang on a rail that lights up to where you have read. The next one to read is open with its summary; marking it as read, the rail runs down to it, the minutes left drop and the one after opens.

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>
<!--
  "Article series rail" 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>Blog article series with the parts read on the rail and the next one that opens</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">
    <!-- a series of articles on a personal blog: the parts hang on a rail that fills up to where you have read; the
         next part is open with its summary, and marking it as read moves the rail and opens the one after -->
    <section class="sr-card" data-series aria-label="Series">
      <header class="se__head">
        <span class="se__title">A year of slow tools<i>A series in five parts</i></span>
        <span class="se__time"><b data-min></b> min left</span>
      </header>
      <div class="se__list" data-list>
        <span class="se__rail" aria-hidden="true"><span data-rail></span></span>
      </div>
      <p class="sr" data-live aria-live="polite"></p>
    </section>

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

14 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 “Article series rail” 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 black, a dark card: at the top the series’ title and how many minutes of reading are left, then five parts in a column with a thin rail on the left. The first two are read (name dimmed, “Read” in aqua), the rail is lit up to them; the third is open: below its title there is a line of summary and a “Mark as read” button, and next to it “Up next” with its minutes. On opening the rail runs down and the minutes count. Hovering a part, its title steps forward; tapping it opens it and closes the other. Pressing “Mark as read”, the part’s notch stretches for a moment, the label rolls to “Read”, the part closes and the next one opens, the rail reaches it with a small bounce and the minutes go down counting. At the last one the rail is fully lit.

How it works

The measured rail

The rail is a line in scaleY from the top. How far it reaches is not a fixed fraction: the centre of the last part read is measured against the rail, because the open part is taller than the others. After the list has settled the rail goes there with back.out(1.4).

One part open at a time

The detail goes from height 0 to its content’s with back.out(1.25); only the next part to read shows the button. Marking it as read moves a counter, updates the labels and opens the next.

The minutes

The minutes left are the sum of the unread parts: they count down with power2.out, no spring, and the number makes a small hop downwards.

Values to change

NameFileDefaultWhat it changes
READscript.js2How many parts are already read at the start (from 0 to 5).
ACCENTscript.js#7fd1c1The colour of the rail and of the part to read.
OPENscript.js0.5How many seconds a part takes to open.
PAUSEscript.js2Alone: how many seconds it stays on each part before marking it as read.
LOOPscript.jstrueLeft alone, a pointer reads the parts left.

Try them in the Playground

When to use it

At the top or bottom of each article of a series on a blog or newsletter, in the index of a course in instalments, a guide in chapters or a podcast: wherever someone coming back must see at once where they left off.

On phones

The same card, as wide as the screen; in short windows the rows drop to 33 pixels. Long titles are cut with an ellipsis.

With reduced motion

The parts open and close at once, the rail and the minutes are at their value straight away, the labels change without rolling.

Pitfalls

  • The rail cannot be worked out before the opening is over: the measure is taken after the opening’s duration plus a margin, otherwise it aims halfway.
  • Next to each part there is a short notch attached to the rail, not a dot: and no ordinal numbers, the parts have a name.
  • The “Mark as read” button is inside the row-button: the click is recognised by its target, and only counts on the next part to read.

Libraries

GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.

Compressed with gzip, the three demo files weigh 5.4 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