
The elastic button
Buttons, Hover, Text
The Start focus button of a focus app, on black: pressed, a light runs round the ring and fills it, 25:00 starts counting down with rolling digits and the button becomes Pause, with End beside it. Paused, the ring breathes once and stops; End empties it, the digits roll back up and the session is marked on the day’s bar.
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 focus 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 Start focus button with a ring of time</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" data-stage>
<!-- the focus card of a made-up concentration app, on near black: a dashed ring waits with 25:00; Start focus
fills the ring with light and the digits start rolling down; the button becomes Pause and End, a pause makes
the ring breathe once, End empties the ring and marks the session -->
<section class="card" data-card aria-label="Stillhour focus session">
<header class="card__head">
<span class="brand">
<svg viewBox="0 0 20 20" aria-hidden="true"><path d="M10 3.2a6.8 6.8 0 1 0 6.8 6.8"></path><path d="M10 6.4V10l2.4 1.6"></path></svg>
Stillhour
</span>
<span class="state" data-state><span class="state__in" data-state-text>Ready</span></span>
</header>
<div class="dial" data-dial>
<svg class="ring" viewBox="0 0 220 220" aria-hidden="true">
<defs>
<linearGradient id="luce" x1="0" y1="0" x2="1" y2="1">
<stop class="s1" offset="0"></stop>
<stop class="s2" offset="1"></stop>
</linearGradient>
</defs>
<g class="ticks" data-ticks></g>
<circle class="ring__track" cx="110" cy="110" r="92"></circle>
<circle class="ring__wait" data-wait cx="110" cy="110" r="92" pathLength="120"></circle>
<g transform="rotate(-90 110 110)">
<circle class="ring__glow" data-glow cx="110" cy="110" r="92" pathLength="1"></circle>
<circle class="ring__arc" data-arc cx="110" cy="110" r="92" pathLength="1"></circle>
<circle class="ring__head" data-head cx="110" cy="110" r="92" pathLength="1"></circle>
</g>
</svg>
<div class="dial__face">
<div class="time" data-time aria-live="off">
<span class="dig" data-dig="600" data-base="6"></span><span class="dig" data-dig="60" data-base="10"></span><span class="colon">:</span><span class="dig" data-dig="10" data-base="6"></span><span class="dig" data-dig="1" data-base="10"></span>
</div>
<p class="task" data-task></p>
</div>
</div>
<div class="controls" data-controls>
<button class="pill" type="button" data-main>
<span class="pill__sheen" aria-hidden="true"></span>
<span class="pill__icon" aria-hidden="true">
<svg class="ic ic--play" data-ic-play viewBox="0 0 20 20"><path d="M7 5.2v9.6l7.4-4.8Z"></path></svg>
<svg class="ic ic--pause" data-ic-pause viewBox="0 0 20 20"><rect x="5.6" y="5" width="3" height="10" rx="1"></rect><rect x="11.4" y="5" width="3" height="10" rx="1"></rect></svg>
</span>
<span class="pill__label"><span class="pill__roll" data-label>Start focus</span></span>
</button>
<button class="end" type="button" data-end aria-label="End session">
<svg viewBox="0 0 20 20" aria-hidden="true"><rect x="6" y="6" width="8" height="8" rx="1.6"></rect></svg>
</button>
</div>
<footer class="today">
<span class="today__label">Today</span>
<span class="bars" data-bars>
<i class="is-done"></i><i class="is-done"></i><i></i><i></i>
</span>
<span class="today__saved" data-saved>
<svg viewBox="0 0 16 16" aria-hidden="true"><path data-check d="M3.4 8.4 6.6 11.4 12.8 4.8" pathLength="1"></path></svg>
<span data-saved-text>Session saved</span>
</span>
<span class="today__total" data-total>50 min</span>
</footer>
</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.
23 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 “Start focus button” from Animorio and fit it into my siteEach digit is a strip from 0 to 9 (or 0 to 5 for the tens) sliding vertically. For each digit the time left is divided by its unit, one second, ten, sixty, six hundred: the whole part gives the digit, and only in the last fifth of a real second before the change does the strip roll to the next one. So at real speed the digits click over one at a time, and they flow smoothly when time runs fast.
The arc is an SVG circle with pathLength 1: the share of time left is the length of the stroke. Underneath sits a wider blurred copy, the glow, and on top a short bright stretch that sits at the tip. Of the sixty ticks, the one under the tip lights up.
Start focus, Pause and Resume are the same button: the word leaves upwards and the new one comes in from below with a small bounce, the triangle and the two bars swap with a turn, and the fill goes from white to dark. End opens by widening from zero on a spring.
Paused, the ring swells by 2.5% and the glow rises, then everything settles and stays still, dimmer: a single breath, never a continuous beat. The digits dim until it resumes.
End empties the arc in eight tenths, takes the time from where it was to 25:00 with a nine-tenth run that turns every digit, fills the day’s next bar from the left and shows Session saved with a check drawing itself, before the grown total comes back. The autopilot is a single timeline; at the first real touch it stops and the button runs in real time.
| Name | File | Default | What it changes |
|---|---|---|---|
MINUTES | script.js | 25 | How long a session lasts, in minutes. |
SPEED | script.js | 90 | How many times faster time runs with the autopilot (1 is real time). |
TASK | script.js | Writing the Q4 brief | The session’s task, under the time. |
ACCENT | script.js | #8fa2ff | The first colour of the ring’s light. |
ACCENT_2 | script.js | #c99bff | The second colour of the ring’s light. |
GLOW | script.js | 1 | How bright the glow around the ring gets. |
For a focus or study app using the pomodoro method, the timer of a workout or a meditation, a meeting countdown, the time tracking of a freelancer app.
The same animation with adapted sizes: the ring is at most 40% of the height wide, the digits are sized in vh and the card fits the frame; a tap presses the button like a click.
No springs, bounces, breath or sheens: the words change with a fade, the digits change without rolling and the ring fills and empties in a few tenths.
GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 8.0 KB; the libraries: GSAP 28 KB.
Tested on 28 October 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.