
The elastic button
Buttons, Hover, Text
The button to record the screen, on white: a black pill with a drawn screen and its red lens. Pressed, it shrinks into a circle where a thin ring fills for 3, 2 and 1, then opens into the recording bar with the stop square, the rolling time and the pause; stopped, it closes again and the recording lands as a small saved card.
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>
<!--
"Screen record 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 screen Record button with a 3, 2, 1 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">
<!-- one gesture: record the screen. The black pill counts down 3, 2, 1 in a ring, then opens into the recording
bar with the time rolling, a pause and a stop; stopping closes it and the clip lands as a small card -->
<div class="frame" data-frame>
<button class="rec" data-btn type="button" aria-label="Record screen">
<span class="layer layer--idle" data-idle>
<span class="mark" data-mark aria-hidden="true">
<svg viewBox="0 0 22 20">
<rect class="mark__screen" x="1.6" y="1.6" width="18.8" height="12.6" rx="2.4"></rect>
<path class="mark__stand" d="M7.6 18.2h6.8M11 14.4v3.6"></path>
<circle class="mark__lens" data-lens cx="11" cy="7.9" r="3"></circle>
</svg>
</span>
<span class="label" data-label>Record screen</span>
</span>
<span class="layer layer--count" data-count aria-hidden="true">
<svg class="ring" viewBox="0 0 56 56">
<circle class="ring__track" cx="28" cy="28" r="23"></circle>
<circle class="ring__run" data-ring cx="28" cy="28" r="23"></circle>
</svg>
<span class="digit" data-digit></span>
</span>
<span class="layer layer--live" data-live aria-hidden="true">
<span class="stop" data-stop role="button" aria-label="Stop recording"><span class="stop__shape" data-stop-shape></span></span>
<span class="time" data-time aria-live="off"></span>
<span class="hair" aria-hidden="true"></span>
<span class="pause" data-pause role="button" aria-label="Pause">
<svg viewBox="0 0 20 20">
<rect class="pause__bar" data-bar-a x="5.4" y="4.5" width="3" height="11" rx="1"></rect>
<rect class="pause__bar" data-bar-b x="11.6" y="4.5" width="3" height="11" rx="1"></rect>
<path class="pause__play" data-play d="M6.5 4.6 15.6 10 6.5 15.4Z"></path>
</svg>
</span>
</span>
</button>
<p class="hint" data-hint>Records this tab</p>
<div class="saved" data-saved aria-live="polite">
<span class="thumb" aria-hidden="true">
<span class="thumb__bar"><i></i><i></i><i></i></span>
<span class="thumb__lines"><i></i><i></i><i></i></span>
<span class="thumb__len" data-len>0:00</span>
</span>
<span class="saved__text">
<b><svg class="tick" viewBox="0 0 16 16" aria-hidden="true"><path data-tick d="M3.5 8.4 6.6 11.4 12.6 4.8"></path></svg> Recording saved</b>
<span data-meta>0:00 · 1080p · 0 MB</span>
</span>
</div>
</div>
<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.
19 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 “Screen record button” from Animorio and fit it into my siteInside the button there are three stacked layers, each as wide as its content: the label, the countdown and the recording bar. Each width is measured once, after the typeface has arrived, and GSAP takes the pill from one to the other with a back.out that goes slightly past and comes back.
The ring is an SVG circle with its dash as long as the circumference: for each number the strokeDashoffset goes from the whole circumference to zero in one second, with no easing, and the new number drops from above with a small bounce while the old one falls away.
GSAP’s ticker counts the time, only while recording and not paused. Each digit has its own column: when it changes, the new one comes in from above with back.out and a touch of blur that melts away, and the old one goes down; the colon stays still.
On stop the bar closes back into the pill and the card rises below with the page thumbnail, the real length of the recording and a check that draws itself with its strokeDashoffset; after a few seconds it rises a few more pixels and fades.
| Name | File | Default | What it changes |
|---|---|---|---|
ACCENT | script.js | #ff3b30 | The colour of the ring, the stop square and the lens in the icon. |
LABEL | script.js | Record screen | The label of the button at rest. |
COUNT_FROM | script.js | 3 | The number the countdown starts from. |
COUNT_STEP | script.js | 1 | How many seconds each number lasts. |
SPRING | script.js | 1.5 | How far the pill overshoots its width and comes back when it opens and closes. |
SAVED_HOLD | script.js | 2.6 | How many seconds the saved recording card stays. |
In screen recording tools, in call and meeting apps, in video editors and tutorial makers, in the panels of apps that record a session or a video message.
The button stays 52 pixels tall, easy for a finger, and the recording bar fits even on a narrow phone; the saved card narrows with the screen. Pause and stop are two 36-pixel circles.
No springs and no falling digits: the pill changes width at once, the layers cross-fade, the numbers and the time change without moving, the ring still fills and the card appears and fades in place. There is no drawn pointer: the loop runs by itself.
GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 7.3 KB; the libraries: GSAP 28 KB.
Tested on 27 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.