
The star rating
Ratings, SVG, Hover
The Arm Away button of a made-up smart home security app, Ostrum, on black. On the tap it checks the sensors one at a time, the front door, the windows and the motion, and each becomes a tick; then an amber light runs around the pill and wears away with the seconds to leave the house, and another tap cancels. At zero the circuit closes in mint green, the shield fills, the padlock snaps and the house is armed. One more tap disarms it: Welcome home.
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>
<!--
"Home alarm arm 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>The Arm Away button of the home alarm with the sensors that close and the exit delay</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 Arm Away button of a made-up home security app, Ostrum: pressed, it checks the front door, the windows
and the motion sensor one by one, then a light runs around the pill for the exit delay; tap again to cancel.
At zero the circuit closes in green, the padlock in the shield snaps shut and the house is armed. -->
<button class="arm" type="button" data-arm aria-pressed="false">
<span class="arm__body" aria-hidden="true"><span class="arm__tint"></span><span class="arm__light"></span></span>
<span class="arm__edge" aria-hidden="true"></span>
<svg class="circuit" data-circuit aria-hidden="true">
<path class="circuit__glow" data-glow></path>
<path class="circuit__run" data-run></path>
<path class="circuit__tip" data-tip></path>
</svg>
<span class="seat" data-seat aria-hidden="true">
<span class="seat__scan" data-scan></span>
<svg viewBox="0 0 24 24">
<path class="seat__fill" data-fill d="M12 3.1 5.2 5.7v5.5c0 4.3 2.9 7.8 6.8 9.4 3.9-1.6 6.8-5.1 6.8-9.4V5.7Z"></path>
<path class="seat__shield" d="M12 3.1 5.2 5.7v5.5c0 4.3 2.9 7.8 6.8 9.4 3.9-1.6 6.8-5.1 6.8-9.4V5.7Z"></path>
<path class="seat__shackle" data-shackle d="M10.1 11.2V9.7a1.9 1.9 0 0 1 3.8 0v1.5"></path>
<rect class="seat__lock" data-lock x="8.7" y="11.1" width="6.6" height="4.9" rx="1.3"></rect>
<path class="seat__hole" d="M12 12.9v1.2"></path>
</svg>
</span>
<span class="label">
<span class="label__main"><span data-word>Arm Away</span></span>
<span class="label__sub"><span data-sub>12 sensors ready</span></span>
</span>
<span class="tag" data-tag aria-hidden="true">
<span class="tag__sensors" data-sensors>
<span class="sensor" data-sensor>
<svg viewBox="0 0 20 20"><g class="sensor__icon"><path d="M5.5 17V3.6h9V17M3.5 17h13"></path><path d="M11.8 10.2v.8"></path></g><path class="sensor__tick" d="M5.6 10.4 8.6 13.3 14.4 7"></path></svg>
</span>
<span class="sensor" data-sensor>
<svg viewBox="0 0 20 20"><g class="sensor__icon"><rect x="3.8" y="3.8" width="12.4" height="12.4" rx="1.4"></rect><path d="M10 3.8v12.4M3.8 10h12.4"></path></g><path class="sensor__tick" d="M5.6 10.4 8.6 13.3 14.4 7"></path></svg>
</span>
<span class="sensor" data-sensor>
<svg viewBox="0 0 20 20"><g class="sensor__icon"><path d="M7.2 7.2a4 4 0 0 0 0 5.6M12.8 7.2a4 4 0 0 1 0 5.6M4.9 4.9a7.3 7.3 0 0 0 0 10.2M15.1 4.9a7.3 7.3 0 0 1 0 10.2"></path><path d="M10 9.2v1.6"></path></g><path class="sensor__tick" d="M5.6 10.4 8.6 13.3 14.4 7"></path></svg>
</span>
</span>
<span class="tag__count" data-count><span data-secs>8s</span></span>
<span class="tag__done" data-done>
<svg viewBox="0 0 20 20"><path d="M7 9V7.2a3 3 0 0 1 6 0V9"></path><rect x="5" y="9" width="10" height="7.4" rx="1.8"></rect></svg>
<span>On</span>
</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.
17 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 “Home alarm arm button” from Animorio and fit it into my siteA single SVG path traces the pill: it starts at the top centre, goes right, makes the half circle, comes back along the bottom and closes on the other side. It is built from the button’s real width and height and rebuilt at every resize, then getTotalLength gives its length.
What shows is the stretch between a and b, two fractions of the circuit: stroke-dasharray as long as b minus a and stroke-dashoffset at minus a. The exit delay moves a from zero to one, arming moves b; the bright tip is the same path with a nine pixel dash, and below sits a blurred copy for the glow. A zero-length dash is hidden, because the round cap would draw a dot.
A single linear tween takes the seconds left from EXIT to zero: the same onUpdate redraws the outline and, when the whole second changes, the number hops four pixels and settles with back.out.
Each sensor hops, its icon shrinks and the tick draws itself from its dasharray, while the status rolls in a one-line window. On arming the shield fills from the centre and the padlock’s shackle drops 1.8 units with back.out, the one pixel bounce.
The same button arms at rest, cancels during the exit delay and disarms when armed; aria-pressed and an aria-live line say out loud what happened. The autopilot stops at the first real click or key.
| Name | File | Default | What it changes |
|---|---|---|---|
EXIT | script.js | 8 | The seconds to leave the house before the alarm arms. |
STEP | script.js | 0.42 | How many seconds to check each sensor. |
READY | script.js | 12 sensors ready | The line under the label at rest. |
WAIT | script.js | #ffb547 | The colour of the exit delay light. |
ARMED | script.js | #5ff2c0 | The colour of the armed house. |
HOLD | script.js | 2.6 | Alone: how many seconds it stays armed before it is disarmed. |
REST | script.js | 1.4 | Alone: how many seconds it waits before trying again. |
LOOP | script.js | true | Left alone, a pointer tries it by itself. |
In a smart home or burglar alarm app, on the home screen: the button that arms the alarm as you leave, with the sensors checked first and the seconds to close the door behind you, like real alarm panels.
The pill takes the screen width minus the margins and below 360 pixels the sensor icons tighten; the finger taps like the mouse. Without hover the pointer light stays off.
No hops or springs: the texts change in place, the ticks and the number fade in, the exit delay light still wears away because it is the count, the green circuit appears already closed and the padlock is already in place.
GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 7.5 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.