
Speeding marquee
Scroll, Text, Hover
A card for the time spent on the phone: switching from today to the week, the total counts, the bars are redrawn on the new scale and the apps swap places, the climbers first. The app past its limit shows the extra part, striped and in another colour; moving over a row turns its time into its share of the total.
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>
<!--
"Screen time 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>Screen time card</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 screen time card: switch between today and the week and the apps change place, the bars are
redrawn and the total counts; the app past its limit shows the part that went over -->
<section class="sc" data-sc aria-label="Screen time">
<header class="sc__head">
<span class="sc__title">Screen time</span>
<div class="sc__seg" data-seg role="radiogroup" aria-label="Period">
<span class="sc__tile" data-tile aria-hidden="true"></span>
<button type="button" role="radio" aria-checked="true" data-period="0">Today</button>
<button type="button" role="radio" aria-checked="false" data-period="1" tabindex="-1">Week</button>
</div>
</header>
<p class="sc__read" aria-live="polite">
<b class="sc__num" data-num></b>
<span class="sc__note"><span data-note></span></span>
</p>
<div class="sc__list" data-list></div>
</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.
15 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 “Screen time card” from Animorio and fit it into my siteThe four rows are absolutely positioned and each has a number, its place, turned into a translateY of one row per unit. Changing period means animating that number: no layout measuring, no jump.
Each app animates its minutes while the scale (the period’s highest value) animates too. The bar, the part past the limit and the tick are recomputed every frame from these two numbers.
Rows going up leave at once with back.out and a tile that grows for a moment; those going down leave a little later, with no lunge. That way the eye follows the overtake.
| Name | File | Default | What it changes |
|---|---|---|---|
ACCENT | script.js | #5b5bf0 | The colour of the bars. |
OVER | script.js | #f0653a | The colour of the part past the limit. |
LIMIT | script.js | 60 | The first app’s daily limit, in minutes. |
SWAP | script.js | 0.7 | How many seconds the rows take to swap places. |
HOLD | script.js | 1.5 | On its own: how many seconds it stops on each step. |
LOOP | script.js | true | Left alone, a pointer switches to the week and looks at two apps. |
In a phone’s settings or a digital wellbeing app, in parental controls, in a weekly summary; and wherever a ranking changes with the period: spending by category, most viewed pages, most played tracks.
The same card: rows are 46 pixels tall (40 in short windows), tapping one shows its share and tapping it again brings the time back.
No swaps or counting: on changing period the rows, bars and total are already in place.
GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 6.2 KB; the libraries: GSAP 28 KB.
Tested on 18 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.