Skip to content
animorio
IT
All components

Start run button

Buttons, Hover, TransitionsGSAP, CSS onlyMediumCompressed weight: Demo 9.2 KBGSAP 28 KBFreeDownload the zip

The Start run button of a made-up running app, Kestrel: a graphite pill with a lime disc and the navigation arrow. On the tap the arrow looks around, the four signal bars fill one at a time with the satellites going up and the GPS locks. Then the pill widens and counts three, two, one with a lime wipe that fills it a third at a time, and on Go it becomes the live run: the time in lime, kilometres and pace below, the route drawing itself on the right with its tip following the curve. A tap pauses, holding it closes a white ring around the disc and saves the run with a tick and the summary.

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>
<!--
  "Start run 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>Start run button with the GPS lock and the countdown</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 start button of a running app: tapped, it looks for the GPS (the arrow searches, the signal bars fill),
         locks, counts three, two, one with a volt wipe and becomes the live run: time, distance, pace and the route
         drawing itself; a tap pauses, holding it finishes the run and saves it -->
    <button class="run" type="button" data-run aria-label="Start run" aria-describedby="run-hint">
      <span class="run__body" aria-hidden="true">
        <span class="run__light"></span>
        <span class="run__sweep" data-sweep></span>
      </span>
      <span class="run__edge" aria-hidden="true"></span>

      <span class="seat" data-seat aria-hidden="true">
        <span class="seat__disc" data-disc></span>
        <svg class="seat__hold" viewBox="0 0 52 52">
          <circle class="seat__holdtrack" data-holdtrack cx="26" cy="26" r="24.5"></circle>
          <circle class="seat__holdring" data-hold cx="26" cy="26" r="24.5" pathLength="1" transform="rotate(-90 26 26)"></circle>
        </svg>
        <svg class="seat__icon" viewBox="0 0 24 24">
          <path class="seat__arrow" data-arrow d="M12 4.2 18.2 19 12 15.6 5.8 19Z"></path>
          <rect class="seat__stop" data-stop x="8" y="8" width="8" height="8" rx="2"></rect>
          <g class="seat__pause" data-pause><rect x="7.6" y="7" width="3" height="10" rx="1.2"></rect><rect x="13.4" y="7" width="3" height="10" rx="1.2"></rect></g>
          <path class="seat__tick" data-tick pathLength="1" d="M7.4 12.4 10.6 15.6 16.8 9"></path>
        </svg>
      </span>

      <span class="label" data-label>
        <span class="label__main"><span data-word>Start run</span></span>
        <span class="label__sub"><span data-sub>Outdoor · Easy 5K</span></span>
      </span>

      <span class="slot" aria-hidden="true">
        <svg class="slot__go" data-go viewBox="0 0 24 24"><path d="M9.5 6.5 15 12l-5.5 5.5"></path></svg>
        <span class="slot__bars" data-bars><i></i><i></i><i></i><i></i></span>
        <svg class="slot__route" data-route viewBox="0 0 64 32">
          <path class="slot__track" d="M5 25C11 25 12 11 20 12.5S27 26 35.5 21 43 6.5 51 8.2 59 17 57.5 24.5"></path>
          <path class="slot__line" data-line d="M5 25C11 25 12 11 20 12.5S27 26 35.5 21 43 6.5 51 8.2 59 17 57.5 24.5"></path>
          <path class="slot__head" data-head d="M3.2 0-2.4 2.6-1.2 0-2.4-2.6Z"></path>
        </svg>
      </span>

      <span class="count" data-countbox aria-hidden="true"><span class="count__n" data-count>3</span></span>
      <span class="wipe" data-wipe aria-hidden="true"><span class="count count--ink"><span class="count__n" data-count2>3</span></span></span>
    </button>
    <p class="sr" id="run-hint">Tap to pause, hold to finish</p>
    <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>

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.

25 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 “Start run 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 white ground sits a 60-pixel graphite pill, with a one-pixel edge catching light at the top, a lime disc on the left with the navigation arrow, «Start run», «Outdoor · Easy 5K» and a small chevron on the right. On hover it rises a pixel and a soft light follows the pointer. On the tap the disc dims to graphite, the arrow turns lime and looks around, the line says «Finding GPS» and on the right four signal bars fill with lime one after another with a small bounce, while the satellites go from three to nine. Locked, the arrow snaps straight, the disc turns lime again and swells, the line rolls to «GPS ready · Accuracy 3 m». Then the pill widens on a spring and a big 3 appears in the middle: a lime wipe fills a third of it and the number turns dark inside, then 2, 1 and «Go» with the pill all lime, swelling a hair. On Go the lime fades and the run remains: the big time in lime, the kilometres and a pace that breathes, the disc with the pause sign, and on the right the dotted route filling with colour, its white tip turning along the curve. A tap pauses: the disc turns white with the stop square and the line says «Paused · hold to finish». Holding it closes a white ring around the disc; let go halfway and it winds back. Closed, the run is saved: the tick draws itself in the blue disc, the route completes, a light crosses the pill and the line says «Run saved» with the kilometres and the time; then it goes back to rest.

How it works

One number for the run

A linear tween takes the run’s seconds from zero onwards, SPEED times real time, and every update recomputes everything: the time, the kilometres by adding the stretch run divided by the current pace (which swings on two slow sines) and the route fraction. Pausing stops the tween, resuming starts it again from the same point.

The route with a turning tip

The route is an SVG path read with getTotalLength: stroke-dashoffset uncovers the part run, and the tip sits at getPointAtLength with the angle taken between that point and one six tenths earlier, so it turns along the curve.

The two-colour countdown

Over the pill sit two copies of the number: a white one on the graphite and a dark one inside a lime layer clipped with clip-path inset. GSAP moves the clip by a third every second and animates both copies together, so the number changes colour exactly where the lime passes.

Tap or hold

Pressing opens a timeline with a two-tenth delay: let go before it starts and it is a tap that pauses; once it starts, the line says to keep holding and an SVG ring closes in HOLD_TIME seconds until the run is saved. Let go halfway and the ring winds back. On the keyboard the same works with Enter or Space held down.

Values to change

NameFileDefaultWhat it changes
LABELscript.jsStart runThe label of the button at rest.
WORKOUTscript.jsOutdoor · Easy 5KThe line below: the kind of run.
GPSscript.js2The seconds to lock the GPS, with the bars filling.
COUNTDOWNscript.js3What it counts down from before Go.
PACEscript.js348The running pace in seconds per kilometre (348 means 5:48 per kilometre).
SPEEDscript.js20How many seconds of running pass in one second of the demo (1 is real time).
ROUTE_KMscript.js0.6After how many kilometres the route on the right is fully drawn.
HOLD_TIMEscript.js0.9The seconds to hold to finish the run.
RUNscript.js4.4The autopilot: how many seconds it runs before holding.
SAVEDscript.js2.6The seconds the summary stays before going back to rest.
WIDEscript.js300The width of the pill during the run, in pixels.
LOOPscript.jstrueLeft alone, a drawn pointer tries it by itself.
--voltstyle.css#c8f53cThe lime colour of the disc, the countdown, the time and the route.
--savedstyle.css#7fe0ffThe colour of the saved run.

Try them in the Playground

When to use it

In the app or site of a running club, a sports watch or a fitness app: the button that starts the workout, with the real wait for the GPS, the countdown and the run already showing inside the button.

On phones

The pill narrows to the screen width minus the margins, open too; the finger taps and holds like the mouse, and the long-press menu is off. Without hover the light stays off.

With reduced motion

No springs, searching arrow or passing light: the labels change with a fade, the bars colour without a bounce, the countdown lime jumps by thirds without sliding, time and route still move because they are the run’s data, and the tick appears already drawn.

Pitfalls

  • The countdown number over the lime must turn dark exactly where the wipe passes: two copies animated together, one inside the clipped layer, instead of a single number changing colour all at once.
  • Tap and long press share one button: the delay of the press timeline decides, not the click, which arrives anyway after a long press and would have paused the run just saved.
  • The lime clip-path needs «round 30px» in both values of the tween, or GSAP cannot match the numbers and the corners come out square.
  • On the phone a long press opens the system menu: contextmenu is cancelled and -webkit-touch-callout is off.
  • The hold ring with a rounded stroke leaves a white dot before it even starts: flat ends.

Libraries

GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.

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

Testing

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