Skip to content
animorio
IT
All components

Activate eSIM button

Buttons, SVG, HoverGSAP, CSS onlyMediumCompressed weight: Demo 8.7 KBGSAP 28 KBFreeDownload the zip

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.

The code

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>

Playground

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

Or ask your AI assistant for it

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 site
Platform licenseFree on your sites and your clients’ sites. Want it inside a website builder, a template platform or a client dashboard? There’s a license for agencies and platforms.

What it does

On a black page a small dark glass card rises slowly, with a faint aqua light in its top corner, a 1px edge that is brighter on top and a fine grain. At the top the made-up brand Roamly and a ‘Travel eSIM’ label; then ‘Japan’ in large type, under it ‘10 GB · 15 days · 5G’ and on the right the price ‘$18’. Under a thin rule sits the status row: four empty signal bars, ‘Not installed’ and the data left, and at the bottom the light ‘Activate eSIM’ pill with its little SIM icon. On tap the pill gives under the finger and comes back on a spring, the label turns into ‘Installing’ and the pill narrows to the right; in the room it leaves a drawn SIM pops in, turning a little: the cut corner, the chip with six bronze contacts and a 1px edge with a light running along it. The contacts light up gold one after another, going round the chip, then the traces between them draw themselves. Meanwhile the status says ‘Searching’ with a shine sliding over it. The four bars fill from left to right, each on a spring that passes the top by a hair and settles; the status turns into ‘Connected · Kansai Mobile’, a light runs along the rule, the card brightens and the data left rolls up on a little odometer to ‘10.0 GB left’, the tens digit coming in only at the very end. The SIM slides into the pill, the pill widens again, fills with aqua with a shine crossing it and says ‘eSIM active’ with a check that draws itself. A couple of seconds later everything goes back: the bars empty from the right, the counter goes down to zero, the pill says ‘Activate eSIM’ again, and the loop starts over by itself.

How it works

A pill that makes room

The 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.

The SIM in SVG

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.

Bars on a spring

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.

The odometer of the data

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.

One timeline per loop

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.

Values to change

NameFileDefaultWhat it changes
ACCENTscript.js#35e0c2The one colour: bars, active pill, glow.
CARRIERscript.jsKansai MobileThe network written after Connected.
DATAscript.js10The gigabytes that roll up on the counter.
SPRINGscript.js1How far each bar passes the top before it settles: 0 none, 2 double.
SPEEDscript.js12 = the whole activation twice as fast, 0.5 = half.
HOLDscript.js2.4How many seconds eSIM active stays before it goes back.
AUTOscript.jstruePlays the activation by itself, again and again.

Try them in the Playground

When to use it

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.

On phones

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.

With reduced motion

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.

Pitfalls

  • The pill's width cannot be animated in percent with GSAP (it does not read percentages back from the CSS): that is why it is a variable from 0 to 1 turned into pixels from the row's real width, worked out again on resize.
  • With Mona Sans, tabular-nums gives a slashed zero: the counter's columns have a fixed width in em, so the digits do not jump without needing tabular figures.
  • The shine on Searching is text with a clipped background: the colour is made transparent only while it searches, otherwise Connected would stay invisible.

Libraries

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.

Testing

Tested on 5 November 2026

  • Desktop: Done
  • Phone: Done
  • Reduced motion: Done
  • Safari on iPhone: To do

License

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.

All components