
The star rating
Ratings, SVG, Hover
The Activate eSIM button of a made-up travel eSIM app, Roamly, inside a small dark glass card: Japan, 10 GB, 15 days, 18 dollars. On tap the pill narrows on a spring and a SIM drawn in SVG pops in beside it and loads: its six gold contacts light up in a ring one after another and a light runs along its edge. Then the four signal bars fill on a spring from left to right, Searching turns into Connected, the gigabytes left roll up on a little odometer to 10.0 and the pill opens again in aqua: eSIM active, with a check that 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>
<!--
"Activate eSIM 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 Activate eSIM button with the signal filling up</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 small dark glass card of a made-up travel eSIM app, Roamly: Japan, 10 GB, 15 days, $18. On tap the
Activate eSIM pill narrows, a drawn SIM pops in beside it and loads (its gold contacts light up one after
another, its edge catches the light), the four signal bars fill on a spring from left to right, the status
goes from Searching to Connected, the data left rolls up to 10.0 GB and the pill opens again as eSIM active
with a drawn check. Then everything goes back -->
<article class="esim" data-esim>
<span class="esim__grain" aria-hidden="true"></span>
<span class="esim__glow" data-glow aria-hidden="true"></span>
<header class="esim__head">
<span class="brand">
<svg class="brand__mark" viewBox="0 0 20 20" aria-hidden="true">
<path d="M3.5 13.5a8 8 0 0 1 13-8"/>
<path d="M6.6 14.6a4.6 4.6 0 0 1 7.2-5.4"/>
<path d="M8.9 16.1a2 2 0 0 1 2.6-2.4"/>
</svg>
<span class="brand__name">Roamly</span>
</span>
<span class="chip">Travel eSIM</span>
</header>
<div class="plan">
<div class="plan__where">
<h1 class="plan__country">Japan</h1>
<p class="plan__what">10 GB · 15 days · 5G</p>
</div>
<p class="plan__price"><span class="plan__cur">$</span>18</p>
</div>
<span class="esim__rule" aria-hidden="true"><span class="esim__rule-lit" data-rule></span></span>
<div class="status">
<span class="bars" data-bars aria-hidden="true">
<span class="bar"><span class="bar__fill" data-bar></span></span>
<span class="bar"><span class="bar__fill" data-bar></span></span>
<span class="bar"><span class="bar__fill" data-bar></span></span>
<span class="bar"><span class="bar__fill" data-bar></span></span>
</span>
<span class="status__words">
<span class="status__label" data-status>Not installed</span>
</span>
<span class="left" data-left aria-hidden="true">
<span class="odo">
<span class="odo__col odo__col--tens" data-tens-wrap><span class="odo__strip" data-col="tens"></span></span><span class="odo__col"><span class="odo__strip" data-col="units"></span></span><span class="odo__dot">.</span><span class="odo__col"><span class="odo__strip" data-col="tenths"></span></span>
</span>
<span class="left__unit">GB left</span>
</span>
</div>
<div class="act" data-act>
<span class="sim" data-sim aria-hidden="true">
<svg class="sim__svg" viewBox="0 0 40 52">
<defs>
<linearGradient id="simBody" x1="0" y1="0" x2="1" y2="1">
<stop offset="0" stop-color="#23282a"/>
<stop offset="1" stop-color="#0d1011"/>
</linearGradient>
<linearGradient id="simEdge" gradientUnits="userSpaceOnUse" x1="-30" y1="0" x2="10" y2="52" data-edge>
<stop offset="0" stop-color="#ffffff" stop-opacity="0.10"/>
<stop offset="0.5" stop-color="#ffffff" stop-opacity="0.85"/>
<stop offset="1" stop-color="#ffffff" stop-opacity="0.10"/>
</linearGradient>
<linearGradient id="padLit" x1="0" y1="0" x2="1" y2="1">
<stop offset="0" stop-color="#ffe9a8"/>
<stop offset="0.55" stop-color="#e2b65a"/>
<stop offset="1" stop-color="#b5832f"/>
</linearGradient>
</defs>
<path class="sim__body" d="M4.5 0.5H29.3L39.5 10.7V47.5a4 4 0 0 1-4 4H4.5a4 4 0 0 1-4-4V4.5a4 4 0 0 1 4-4Z"/>
<path class="sim__edge" d="M4.5 0.5H29.3L39.5 10.7V47.5a4 4 0 0 1-4 4H4.5a4 4 0 0 1-4-4V4.5a4 4 0 0 1 4-4Z"/>
<rect class="sim__chip" x="8.5" y="17" width="23" height="19" rx="3.4"/>
<g class="sim__pads">
<rect class="pad" x="9.5" y="18" width="9.6" height="5.1" rx="1.4"/>
<rect class="pad" x="20.9" y="18" width="9.6" height="5.1" rx="1.4"/>
<rect class="pad" x="9.5" y="24" width="9.6" height="5" rx="1.2"/>
<rect class="pad" x="20.9" y="24" width="9.6" height="5" rx="1.2"/>
<rect class="pad" x="9.5" y="29.9" width="9.6" height="5.1" rx="1.4"/>
<rect class="pad" x="20.9" y="29.9" width="9.6" height="5.1" rx="1.4"/>
</g>
<g class="sim__lit">
<rect data-pad x="9.5" y="18" width="9.6" height="5.1" rx="1.4"/>
<rect data-pad x="20.9" y="18" width="9.6" height="5.1" rx="1.4"/>
<rect data-pad x="20.9" y="24" width="9.6" height="5" rx="1.2"/>
<rect data-pad x="20.9" y="29.9" width="9.6" height="5.1" rx="1.4"/>
<rect data-pad x="9.5" y="29.9" width="9.6" height="5.1" rx="1.4"/>
<rect data-pad x="9.5" y="24" width="9.6" height="5" rx="1.2"/>
</g>
<path class="sim__trace" data-trace pathLength="1" d="M14.3 23.1V29.9M25.7 23.1V29.9M19.1 26.5H20.9"/>
<path class="sim__notch" d="M8 44.5h9"/>
</svg>
</span>
<button class="pill" type="button" data-pill>
<span class="pill__skin" aria-hidden="true">
<span class="pill__fill" data-fill></span>
<span class="pill__sheen" data-sheen></span>
</span>
<span class="pill__face" data-face>
<svg class="pill__icon" viewBox="0 0 16 16" aria-hidden="true">
<path class="pill__simic" data-simic d="M4.6 1.8h4.9l2.7 2.7v8.2a1.5 1.5 0 0 1-1.5 1.5H4.6a1.5 1.5 0 0 1-1.5-1.5V3.3a1.5 1.5 0 0 1 1.5-1.5ZM6 8h4v3.2H6Z"/>
<path class="pill__check" data-check pathLength="1" d="M3.2 8.6l3 3 6.6-7"/>
</svg>
<span class="pill__words" data-words>Activate eSIM</span>
</span>
</button>
</div>
</article>
<p class="sr" aria-live="polite" data-live></p>
</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.
26 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 “Activate eSIM button” from Animorio and fit it into my siteThe pill sits on the right of its row and its width in pixels is set by a single variable from 0 to 1, animated by GSAP with a back.out: at 1 it leaves 54 pixels for the SIM. The width is worked out again on resize and halfway through the loop, because it is always read from the row.
One path makes the body with the cut corner; the same one, unfilled, makes the edge with a gradient in the SIM's own coordinates: GSAP moves the gradient's x1 and x2 and the light runs along the edge. The contacts are two groups of six rectangles: underneath the dark bronze ones, on top the lit gold ones, which light up with a stagger in the order of the ring.
Each bar has its own empty track and a fill that grows with scaleY from the bottom, with a back.out whose strength comes from SPRING: it passes the top by a hair and settles. The stagger runs left to right on the way in and the other way round on the way back.
Each digit is a column of eleven numbers moved in em: the tenths position is continuous, the units only click over while the tenths pass from 9 to 0, as on a real odometer. The tens column is zero wide until the number passes ten, and widens while it rolls.
The whole loop is one timeline with absolute times (press, SIM, contacts, bars, connection, active, back) and a timeScale for SPEED; when it ends a delayedCall starts it again. The shine on Searching is a gradient clipped to the text that GSAP slides along until the connection comes.
| Name | File | Default | What it changes |
|---|---|---|---|
ACCENT | script.js | #35e0c2 | The one colour: bars, active pill, glow. |
CARRIER | script.js | Kansai Mobile | The network written after Connected. |
DATA | script.js | 10 | The gigabytes that roll up on the counter. |
SPRING | script.js | 1 | How far each bar passes the top before it settles: 0 none, 2 double. |
SPEED | script.js | 1 | 2 = the whole activation twice as fast, 0.5 = half. |
HOLD | script.js | 2.4 | How many seconds eSIM active stays before it goes back. |
AUTO | script.js | true | Plays the activation by itself, again and again. |
For a travel eSIM app or site, a mobile carrier, a hotel that gives its guests mobile data or a travel agency: the moment the plan you bought becomes a real connection, shown step by step without a loading bar.
The same animation with adapted sizes: the card is 90% of the screen wide up to 352 pixels, the inner margins shrink with the height and the pill narrows reading the real width of its row; a tap activates it.
Nothing moves: the pill changes width at once, the SIM fades in, the contacts and bars fade in one after another, the counter shows 10.0 at once and the words change with a fade.
GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 8.7 KB; the libraries: GSAP 28 KB.
Tested on 5 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.