
The colour columns
Hover, SVG
The loans page of a library: three books, each with a bar running from today to its due date on a shared line of four weeks. The one due in two days is orange. Renewing it, the bar runs two weeks further and settles, the days count, the orange turns blue and the button says “Renewed”.
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>
<!--
"Library loans 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>Library loans with the due dates on the line of days and the renewal that moves them</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 loans page of a public library: each book has a bar from today to its due date on a shared line of four
weeks; renewing pushes the bar two weeks further, the days count up and the warning colour goes away -->
<section class="lib" data-lib aria-label="Your loans">
<header class="lib__head">
<span class="lib__title">Your loans</span>
<span class="lib__brand">Alder Library</span>
</header>
<div class="lib__weeks" aria-hidden="true"><span>Today</span><span>1 week</span><span>2 weeks</span><span>3 weeks</span></div>
<div class="lib__rows" data-rows>
<div class="lib__grid" aria-hidden="true"><i></i><i></i><i></i><i></i></div>
</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>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
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 “Library loans timeline” from Animorio and fit it into my siteEach row has a CSS variable --d with the days to the due date: the bar’s width and the label’s position are calc(var(--d) / 28 * 100%). The script animates a number and writes it into the variable: bar, label and count stay together.
The number goes from 2 to 16 with back.out(1.25): the bar slightly passes the new due date and comes back. Meanwhile scaleY goes to 1.6 and back with elastic.out. Below SOON days the row has the class that gives it the warning colour.
The week rules are a four-column grid absolutely positioned behind the rows, starting where the bars start: so the due dates of different books compare at a glance.
| Name | File | Default | What it changes |
|---|---|---|---|
EXTRA | script.js | 14 | By how many days the renewal moves the due date. |
SOON | script.js | 3 | Below how many days the due date takes the warning colour. |
ACCENT | script.js | #3457d5 | The colour of the loans with time left. |
WARN | script.js | #e07a1f | The colour of those due soon. |
SLIDE | script.js | 0.9 | How many seconds the bar takes to stretch. |
HOLD | script.js | 2.2 | Alone: how many seconds the renewals stay before starting over. |
LOOP | script.js | true | Left alone, a pointer renews two books. |
In a library’s reader area, in a reading or rental app, in any list of things with a deadline that can be moved (subscriptions, rentals, free trials, paperwork).
The same card, as wide as the screen; title and author are cut with an ellipsis, the button stays whole. Past three weeks the due label moves above the end of the bar so it does not leave the card.
The bars are already at their size; on renewal bar, days and colour change at once and the button says “Renewed” without rolling.
GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 5.2 KB; the libraries: GSAP 28 KB.
Tested on 16 November 2026
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.
Support Animorio
Animorio stays free thanks to the people who support it. If you like, buy us a coffee: it helps us make the next animations.
You asked for
We made it for you: it’s in the library, with the preview, the Playground and the code to copy.
An animation you can’t find, or a site to take apart in the journal: tell us which. We pick the next ones from here.
With your account’s email and password.
or with your email
You’re signed in as .
With your account, you can download the zip of every animation and every pack, for free.