Skip to content
animorio
IT
All components

Screen record button

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

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.

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>
<!--
  "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>

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.

19 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 “Screen record 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 white there is a black pill, Record screen, with a small drawn screen and its red lens; below, in grey, Records this tab. On hover the label widens slightly and the lens grows. Pressed, the pill shrinks with a spring into a circle: inside, a thin red ring fills in one second for each number, and 3, 2 and 1 drop from above one after another. On the last turn the circle opens into the recording bar: on the left the red round turns into a stop square with a bounce, in the middle the time starts at 0:00 and every digit that changes rolls in from above, on the right the pause. Pause stops the time, which dims, and the two bars turn into the triangle to resume; stop closes the bar back into the pill and below comes the card of the saved recording, with the page thumbnail, the length, the green check drawing itself and the file size, then it goes.

How it works

One pill, three layers

Inside 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 3, 2, 1 ring

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.

The rolling time

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.

The saved card

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.

Values to change

NameFileDefaultWhat it changes
ACCENTscript.js#ff3b30The colour of the ring, the stop square and the lens in the icon.
LABELscript.jsRecord screenThe label of the button at rest.
COUNT_FROMscript.js3The number the countdown starts from.
COUNT_STEPscript.js1How many seconds each number lasts.
SPRINGscript.js1.5How far the pill overshoots its width and comes back when it opens and closes.
SAVED_HOLDscript.js2.6How many seconds the saved recording card stays.

Try them in the Playground

When to use it

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.

On phones

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.

With reduced motion

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.

Pitfalls

  • The recording bar is measured while it is still hidden: the time has to be written before measuring, or the pill opens too narrow and the pause button stays outside.
  • The widths have to be measured again when the variable typeface arrives: with the system one the label is a few pixels shorter and the pill clips the last letter.

Libraries

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.

Testing

Tested on 27 October 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