
The star rating
Ratings, SVG, Hover
The button that extends a free trial about to run out: on the left an orange ring with the days left, on the right the chip “+7”. Press it and the chip jumps into the ring, which bounces and fills again while the number counts from 3 to 10 and the orange turns green; the label rolls into “Trial extended”, the end date changes and a tick draws itself.
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>
<!--
"Extend trial button" 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>Extend trial button</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 button that adds days to a free trial about to end: the chip flies into the ring, the ring fills
again, the days count up and the end date rolls to the new one, amber turning green -->
<button class="et" type="button" data-et>
<span class="et__ring" data-ringbox aria-hidden="true">
<svg viewBox="0 0 48 48"><circle class="et__track" cx="24" cy="24" r="21"></circle><circle class="et__arc" data-arc pathLength="1" cx="24" cy="24" r="21" transform="rotate(-90 24 24)"></circle></svg>
<b data-days></b>
</span>
<span class="et__text">
<span class="et__label"><span data-label>Extend trial</span></span>
<span class="et__sub"><span data-sub></span></span>
</span>
<span class="et__side" aria-hidden="true">
<span class="et__chip" data-chip></span>
<svg class="et__tick" viewBox="0 0 18 18"><path data-tick pathLength="1" d="M4 9.500l3.300 3.300L14 5.800"></path></svg>
</span>
</button>
<span class="et__say" data-say aria-live="polite"></span>
<svg class="ghost" data-ghost viewBox="0 0 24 24" aria-hidden="true"><path d="M5 3.200 19.200 11l-6.300 1.600-3.300 5.900Z"></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.
12 values to change
Works with Claude, Claude Code, ChatGPT, Cursor, VS Code, Windsurf, Codex, Gemini CLI
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 “Extend trial button” from Animorio and fit it into my siteThe days are a number: the arc (stroke-dashoffset on a circle with pathLength 1), the figure in the middle and the colour all read it from the same function.
gsap.utils.interpolate prepares the passage between the two colours; at each step the right colour goes into a CSS variable used by the ring and the shadow.
The distance between the chip and the ring’s centre is measured at that moment; the x runs on a curve and the y makes a hop, so the flight is an arc.
The end date is worked out by adding the days to a fixed day and written with toLocaleDateString: change DAYS_LEFT or EXTRA and the dates change too.
| Name | File | Default | What it changes |
|---|---|---|---|
ACCENT | script.js | #1fa971 | The colour of the ring and the tick once the trial has been extended. |
DAYS_LEFT | script.js | 3 | How many trial days are left before pressing. |
EXTRA | script.js | 7 | How many days the button adds. |
FILL_TIME | script.js | 0.9 | How many seconds the ring takes to fill while the days count. |
SPRING | script.js | 1 | How much the ring bounces when it receives the days: 0.3 = a little, 2 = a lot. |
LOOP | script.js | true | Left alone, the demo’s pointer extends the trial and then everything goes back. |
In the notice of a free trial about to end, on the plan page of a subscription service or in an in-app message: wherever extra days are given once only.
The same button, 296 by 66 pixels at most: on a narrow screen the pill shortens and the chip’s flight is measured again; the two lines never wrap.
No flight, bounce or counting: on tap the ring, the number, the two lines and the tick show the extended trial at once. The demo does not move by itself.
GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 4.6 KB; the libraries: GSAP 28 KB.
Tested on 22 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.
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.