
The star rating
Ratings, SVG, Hover
A VPN switch: a round power key inside a ring. Press it and the ring closes, lighting its ticks one by one, the green light blooms, a beam starts orbiting, the session clock runs and the server row swaps country, closing the ring 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>
<!--
"VPN power switch" 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>VPN power switch</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 VPN switch: the round key closes a ring of light while it connects, then a beam keeps orbiting,
the session clock runs and the server row swaps the exit country -->
<section class="vp" data-vp aria-label="Portal VPN">
<span class="vp__sheen" aria-hidden="true"></span>
<header class="vp__head">
<span class="vp__brand">Portal VPN</span>
<span class="vp__status" aria-live="polite"><span data-status>Not protected</span></span>
</header>
<div class="vp__dial">
<span class="vp__halo" data-halo aria-hidden="true"></span>
<svg class="vp__ring" viewBox="0 0 160 160" aria-hidden="true">
<defs>
<filter id="vp-glow" x="-30%" y="-30%" width="160%" height="160%"><feGaussianBlur stdDeviation="3.2"></feGaussianBlur></filter>
</defs>
<circle class="vp__track" cx="80" cy="80" r="70"></circle>
<g class="vp__ticks" data-ticks></g>
<path class="vp__arc vp__arc--glow" data-arc-glow pathLength="1" d="M80 10A70 70 0 1 1 79.990 10" filter="url(#vp-glow)"></path>
<path class="vp__arc" data-arc pathLength="1" d="M80 10A70 70 0 1 1 79.990 10"></path>
<g data-comet>
<path class="vp__comet vp__comet--glow" pathLength="1" d="M80 10A70 70 0 1 1 79.990 10" filter="url(#vp-glow)"></path>
<path class="vp__comet" pathLength="1" d="M80 10A70 70 0 1 1 79.990 10"></path>
</g>
</svg>
<button class="vp__key" type="button" role="switch" aria-checked="false" aria-label="VPN connection" data-key>
<span class="vp__key-face" data-face>
<svg viewBox="0 0 32 32" aria-hidden="true">
<path class="vp__power-arc" d="M10.200 9.600a9.400 9.400 0 1 0 11.600 0"></path>
<path class="vp__power-bar" data-bar d="M16 5.200v9.600"></path>
</svg>
</span>
</button>
</div>
<p class="vp__clock" aria-label="Session time"><span data-clock></span></p>
<button class="vp__server" type="button" data-server aria-label="Change server">
<svg class="vp__globe" viewBox="0 0 20 20" aria-hidden="true"><circle cx="10" cy="10" r="7.200"></circle><path d="M2.800 10h14.400M10 2.800c2.600 2.300 2.600 12.100 0 14.400M10 2.800c-2.600 2.300-2.600 12.100 0 14.400"></path></svg>
<span class="vp__place"><span data-place></span></span>
<span class="vp__ping"><b data-ping>0</b> ms</span>
<svg class="vp__chev" viewBox="0 0 12 12" aria-hidden="true"><path d="M4.200 2.400 7.800 6l-3.600 3.600"></path></svg>
</button>
</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.
16 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 “VPN power switch” from Animorio and fit it into my siteThe ring (p), the light (on), the beam’s turn and the ping live in one object: GSAP animates those numbers and a single function redraws arc, ticks, colours and digits on every frame.
The arc has pathLength 1 and closes with stroke-dashoffset in CONNECT seconds; when it closes the halo goes to 1.16 and back to 1 with elastic.out, and the CSS variable --on takes key, status and card shadow to green.
The beam is a short stroke of the same circle, rotated through the transform attribute by a number that grows 360 degrees every ORBIT seconds. The time is read from GSAP’s ticker and moves only the characters that change.
| Name | File | Default | What it changes |
|---|---|---|---|
ACCENT | script.js | #5ef0b4 | The colour of the light when you are protected. |
CONNECT | script.js | 1.5 | How many seconds the ring takes to close. |
ORBIT | script.js | 3.6 | How many seconds the light beam takes for one turn. |
START_ON | script.js | false | It opens already connected. |
HOLD | script.js | 3.4 | On its own: how many seconds it stays connected before changing server. |
LOOP | script.js | true | Left alone, a pointer connects, changes server and disconnects. |
In the app of a VPN, an antivirus or a password manager, and wherever a protection is switched on with one gesture: a router’s firewall, private mode, a browser’s shield.
The same component: the ring never exceeds 40% of the window’s height, the key stays over a hundred pixels wide and the server row is 46 tall.
No closing ring, springs or orbiting beam: on and off change at once, the time still counts.
GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 6.9 KB; the libraries: GSAP 28 KB.
Tested on 17 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.