
The star rating
Ratings, SVG, Hover
The button that opens the gate in a video intercom’s app: a dark pill with a small door and the opening seconds. Pressed, the buzz shakes the seat and sends two waves, the small door swings open on its hinge, the pill lights up yellow and a line along the bottom runs out with the seconds; at zero the door slams and the gate is locked again.
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>
<!--
"Open the gate 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>Open the gate button of the intercom with the time that runs out before it locks again</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 gate button of a video intercom's app: pressed, the buzzer sends its waves, the little door swings
open and a line along the bottom of the pill runs out with the seconds; at zero the door closes again -->
<button class="gate" type="button" data-gate>
<span class="gate__body" aria-hidden="true"><span class="gate__bar" data-bar></span><span class="gate__light"></span></span>
<span class="gate__edge" aria-hidden="true"></span>
<span class="seat" data-seat aria-hidden="true">
<svg viewBox="0 0 24 24">
<path d="M6.200 20.400V5.600a2 2 0 0 1 2-2h7.600a2 2 0 0 1 2 2v14.800M4 20.400h16"></path>
<g data-leaf><path class="seat__leaf" d="M8.400 5.800h7.200v14.600H8.400Z"></path><path class="seat__knob" d="M13.400 12.600v1.400"></path></g>
<path class="seat__wave" data-wave d="M19.800 9.200a4 4 0 0 1 0 5.600"></path>
<path class="seat__wave" data-wave d="M22 7.200a7 7 0 0 1 0 9.600"></path>
</svg>
</span>
<span class="label">
<span class="label__main"><span data-word>Open the gate</span></span>
<span class="label__sub"><span data-sub>Courier at the front gate</span></span>
</span>
<span class="tag" aria-hidden="true"><span data-secs>5s</span></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.
14 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 “Open the gate button” from Animorio and fit it into my siteFor BUZZ seconds the seat swings 1.2 pixels right and left (a tween going and returning, repeated) and two SVG arcs light one after the other while moving 4 units, twice.
The leaf is an SVG group with its origin on the hinge (svgOrigin on the left side): opening it goes to scaleX 0.42 with a small skewY, that is, it is seen at an angle; back.out makes it slightly pass the point and return. Closing it uses power3.in, which accelerates up to the hit.
A number goes from OPEN down to zero in OPEN seconds, linear: the line at the bottom has scaleX equal to its fraction and the tag shows the number rounded up, rewritten only when it changes. At the end the timeline calls the locking.
| Name | File | Default | What it changes |
|---|---|---|---|
OPEN | script.js | 5 | For how many seconds the gate stays open. |
BUZZ | script.js | 0.6 | How many seconds the buzz lasts before opening. |
WHO | script.js | Courier at the front gate | Who rang (invented). |
ACCENT | script.js | #ffd24a | The colour of the open gate and of the line. |
REST | script.js | 1.6 | On its own: how many seconds it waits before trying again. |
LOOP | script.js | true | Left alone, a pointer tries it by itself. |
For the app of a video intercom, a smart lock, an automatic gate or an apartment block: you see at once that it is open and for how much longer. It suits any action that holds for a few seconds: a temporary code, a link that expires, a timed unlock.
The same button: the pill takes at most the screen width minus the margins; it is pressed with a finger and there is no light under the pointer.
No shaking, waves or turning door: the door is open or closed at once, the line and the seconds still go down because they are the information.
GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 5.0 KB; the libraries: GSAP 28 KB.
Tested on 15 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.