Skip to content
animorio
IT
All components

Hotspot button

Buttons, HoverGSAP, CSS onlyEasyCompressed weight: Demo 4.9 KBGSAP 28 KBFreeDownload the zip

The button that turns on the phone’s personal hotspot, on black: on tap the arcs of the sign draw from the centre outwards while it starts, then the tile turns green and on the right the devices that join come in one by one, with the count rolling. Another tap and they leave in a row.

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>
<!--
  "Hotspot 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>Hotspot button</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 button that turns on the phone's personal hotspot: the arcs draw themselves while it starts,
         the tile lights up and the devices that join pop in on the right, one by one, with the count rolling -->
    <div class="hs" data-hs>
      <button class="hs__btn" type="button" aria-pressed="false" data-btn>
        <span class="hs__tile" data-tile aria-hidden="true">
          <svg viewBox="0 0 28 28">
            <circle class="hs__dot" cx="14" cy="14" r="2"></circle>
            <path data-arc pathLength="1" d="M10.200 10.600a5.100 5.100 0 0 0 0 6.800"></path>
            <path data-arc pathLength="1" d="M17.800 10.600a5.100 5.100 0 0 1 0 6.800"></path>
            <path data-arc pathLength="1" d="M7 7.800a9.300 9.300 0 0 0 0 12.400"></path>
            <path data-arc pathLength="1" d="M21 7.800a9.300 9.300 0 0 1 0 12.400"></path>
          </svg>
        </span>
        <span class="hs__text">
          <span class="hs__label">Personal Hotspot</span>
          <span class="hs__sub"><span data-sub>Off</span></span>
        </span>
        <span class="hs__stack" aria-hidden="true">
          <span class="hs__dev" data-dev><svg viewBox="0 0 16 16"><rect x="5" y="2.200" width="6" height="11.600" rx="1.600"></rect></svg></span>
          <span class="hs__dev" data-dev><svg viewBox="0 0 16 16"><rect x="3.500" y="2.500" width="9" height="11" rx="1.500"></rect><path d="M7.200 11.500h1.600"></path></svg></span>
          <span class="hs__dev" data-dev><svg viewBox="0 0 16 16"><rect x="3" y="3.500" width="10" height="6.800" rx="1.200"></rect><path d="M1.800 12.500h12.400"></path></svg></span>
        </span>
      </button>
      <span class="hs__say" data-say aria-live="polite"></span>
    </div>

    <svg class="ghost" data-ghost viewBox="0 0 24 24" aria-hidden="true"><path d="M5 3.200 19.200 11l-6.300 1.600-3.300 5.900Z"></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>

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.

14 values to change

Works with Claude, Claude Code, ChatGPT, Cursor, VS Code, Windsurf, Codex, Gemini CLI

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 “Hotspot 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 black, a dark pill: on the left a tile with the hotspot sign (a dot and two arcs per side), then “Personal Hotspot” and under it “Off”. On tap the button gives on a spring, the line below rolls into “Turning on…” and the arcs draw from the dot outwards, the near ones first and then the far ones, several times. Once on, the tile turns green with a bounce, the pill’s border and shadow take the same green and the line says “Discoverable”. Then three small tiles come in on the right one after the other, a phone, a tablet and a laptop, overlapping like a stack of avatars: at every arrival the outer arcs flash and the line rolls into “1 device connected”, “2 devices connected”, “3 devices connected”. Another tap turns it off: the devices leave in a row, the green withdraws and “Off” returns.

How it works

Three states

Off, starting, on: the click goes from the first to the second, a call delayed by START seconds leads to the third; a click at any moment turns it off and cancels the pending calls.

The arcs

They have pathLength 1: while starting, a repeating timeline takes the dashoffset from 1 to 0, the two inner ones first and then the two outer ones, and dims them before starting over.

The devices

Each tile comes in with scale, x and opacity on a spring; the row is reversed (row-reverse), so the first to arrive sits on the right and the others line up beside it.

The count

At every arrival the line below rolls with the new number and the outer arcs flash once.

Values to change

NameFileDefaultWhat it changes
ACCENTscript.js#34d67cThe colour of the hotspot when on.
DEVICESscript.js3How many devices join in the demo: 0 to 3.
JOINscript.js0.9The seconds between one device and the next.
STARTscript.js0.9How long turning on takes, in seconds.
SPRINGscript.js1How much the button and the joining devices bounce: 0.3 = a little, 2 = a lot.
LOOPscript.jstrueLeft alone, the demo’s pointer turns the hotspot on, waits for the devices and turns it off.

Try them in the Playground

When to use it

In the settings or the control centre of a phone app, for a router, a SIM or an eSIM, and for anything that turns on and then shows who joined: a shared room, a printer, a speaker.

On phones

The same button, 298 pixels wide at most and 64 tall: on a narrow screen the label stays on one line and the three devices overlap a little to fit.

With reduced motion

No drawing arcs and no bounces: the states change at once, the line below changes without rolling and the devices fade in at their place. The demo does not move by itself.

Pitfalls

  • The devices are made up and join by themselves on a timer: in a real app they come from the system, and they can also leave one at a time.
  • The button has aria-pressed and a hidden aria-live line that says the state and how many devices are connected.
  • Turning it off while it is starting has to cancel the pending calls, or the hotspot turns itself back on a moment later.
  • The devices’ tile has a border in the pill’s colour: that is what makes them look overlapped, and it has to change with the background.

Libraries

GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.

Compressed with gzip, the three demo files weigh 4.9 KB; the libraries: GSAP 28 KB.

Testing

Tested on 23 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