
The star rating
Ratings, SVG, Hover
The button on top of a metered article: a dark pill with a lock and three golden bars, the free reads left this month. Pressed, the lock’s shackle jumps up and swings open on a spring, one bar runs down, a golden sheen crosses the pill and the label says how many reads are left.
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>
<!--
"Unlock article 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>Unlock this article button with the lock that opens and the free reads that run down</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 on top of a metered article: three small bars say how many free reads are left this month;
pressed, the lock's shackle springs open, one bar drains, a sheen crosses the pill and the label says
how many reads are left; after a moment it goes back, so the demo can be tried again -->
<button class="unlock" type="button" data-unlock aria-pressed="false">
<span class="unlock__glow" aria-hidden="true"></span>
<span class="unlock__body" aria-hidden="true"><span class="unlock__wash" data-wash></span><span class="unlock__sheen" data-sheen></span><span class="unlock__light"></span></span>
<span class="unlock__edge" aria-hidden="true"></span>
<span class="seat" data-seat aria-hidden="true">
<svg viewBox="0 0 24 24"><path data-shackle d="M8.4 11.2V8.4a3.6 3.6 0 0 1 7.2 0v2.8"></path><rect x="5.6" y="11.2" width="12.8" height="9" rx="2.6"></rect><path class="seat__hole" d="M12 14.6v2.2"></path></svg>
</span>
<span class="label"><span class="label__word" data-word>Unlock this article</span></span>
<span class="reads" data-reads aria-hidden="true"><i></i><i></i><i></i></span>
</button>
<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>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.
13 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 “Unlock article button” from Animorio and fit it into my siteThe shackle is a separate SVG path, with its rotation origin on its right foot (svgOrigin): first it drops 0.9 units, then rises 1.4 and rotates OPEN degrees with elastic.out. The body stays still.
The three bars scale vertically from the bottom: the ones left are tall and lit, the ones used are short and at 30%. On unlock, the last one left goes from one state to the other with back.out, two tenths after the lock.
Inside the pill a slanted band slides from minus 100% to 100% of the width; a golden veil stays on the lock’s side and a blurred halo lights up under the pill.
It leaves upwards and the new one comes in from below; the text depends on how many reads are left: ‘2 free reads left’, ‘1 free read left’ or ‘your last free read’.
| Name | File | Default | What it changes |
|---|---|---|---|
IDLE | script.js | Unlock this article | The label at rest. |
FREE | script.js | 3 | How many free reads are left this month, 1 to 3. |
OPEN | script.js | 34 | By how many degrees the lock’s shackle opens. |
SPRING | script.js | 0.8 | How long the lock’s spring lasts, in seconds. |
ACCENT | script.js | #f3c24f | The colour of the reads and the light. |
HOLD | script.js | 2.6 | By itself: how many seconds it stays open before going back. |
LOOP | script.js | true | Left alone, a pointer tries it by itself. |
For a newspaper, an online magazine, a blog or a newsletter with a few free articles a month: the button says at once how many reads are left, before and after, with no separate notice. On a real site, after unlocking the article opens and the button does not go back.
The same button: the pill takes at most the screen width minus the margins and the long label is cut with an ellipsis.
No springs and no sheen: the lock appears already open, the bar changes with a fade and the label changes with a fade.
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 14 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.