Skip to content
animorio
IT
Back to the library

Screenshot capture

Transitions, HoverGSAP, CSS onlyMediumCompressed weight: Demo 5.5 KBGSAP 28 KBFreeDownload the zip

Taking a screenshot: tap Capture and the screen flashes white while the capture, with its white edge, shrinks on a spring into a thumbnail in the bottom left corner. It waits there a few seconds: if nobody taps it, it slides away to the left and the count of captures in Photos goes up; tapped, it comes back large in the middle over the dimmed screen, and one more tap saves it.

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>
<!--
  "Screenshot capture" 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>Screenshot capture</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">
    <!-- taking a screenshot: the screen flashes, the capture shrinks into a thumbnail in the corner,
         waits there to be tapped and then slides away, saved -->
    <section class="sc" data-sc data-state="idle" aria-label="Screenshot capture">
      <div class="sc__screen" data-screen>
        <div class="sc__ui" data-ui>
          <div class="sc__bar"><span class="sc__logo"></span><b>Fieldnotes</b><span class="sc__chip">Shared</span></div>
          <div class="sc__body">
            <div class="sc__art"><i></i><i></i><i></i></div>
            <div class="sc__copy">
              <strong>Lisbon, day two</strong>
              <span class="sc__l" style="width: 96%"></span><span class="sc__l" style="width: 82%"></span><span class="sc__l" style="width: 64%"></span>
              <div class="sc__bars"><i style="height: 38%"></i><i style="height: 62%"></i><i style="height: 48%"></i><i style="height: 86%"></i><i style="height: 70%"></i><i style="height: 54%"></i></div>
            </div>
          </div>
        </div>
        <span class="sc__dim" data-dim aria-hidden="true"></span>
        <button class="sc__shot" type="button" data-shot aria-label="Open the screenshot preview" tabindex="-1"><span class="sc__copyui" data-copy aria-hidden="true"></span></button>
        <span class="sc__flash" data-flash aria-hidden="true"></span>
      </div>
      <div class="sc__row">
        <button class="sc__btn" type="button" data-btn>
          <svg viewBox="0 0 20 20" aria-hidden="true"><path d="M3 7V4.500A1.500 1.500 0 0 1 4.500 3H7M13 3h2.500A1.500 1.500 0 0 1 17 4.500V7M17 13v2.500a1.500 1.500 0 0 1-1.500 1.500H13M7 17H4.500A1.500 1.500 0 0 1 3 15.500V13"></path><circle cx="10" cy="10" r="2.600"></circle></svg>
          <span>Capture</span>
        </button>
        <span class="sc__status"><span data-outstatus>12 screenshots in Photos</span></span>
      </div>
    </section>
    <span class="live" aria-live="polite" data-live></span>

    <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.

15 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 “Screenshot capture” 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 warm light background, a dark-rimmed screen holding a notes app (the bar with its name, a faded orange picture, a title, a few lines and a small chart); below, the dark “Capture” button and on the right how many captures there are in Photos. Tap the button and it tightens and bounces, the screen flashes white and the app takes a small breath; a copy of the screen with a white edge comes off and shrinks towards the bottom left corner, going slightly past its size and settling into a thumbnail with a shadow, while the label rolls to “Captured, tap the preview”. After a few seconds the thumbnail slides out to the left and the count goes up to 13. Capture again and tap the thumbnail: the screen dims and the capture comes back large in the middle on a spring; one more tap and it slides away, saved.

How it works

The copy

On tap the script copies the screen’s HTML into a button as large as the screen, laid on top: that is the capture. The flash is a white veil going from almost full to transparent in half a second.

Into the corner

The capture has its transform origin at the bottom left: GSAP takes it to the SIZE scale and moves it ten pixels off the edge, with a slight overshoot. Then the HOLD seconds of waiting start.

Away, or to the middle

When the wait is over the thumbnail leaves to the left and the count goes up. If it is tapped first, the wait stops and the capture goes to scale 0.78 in the middle, the offset worked out from the screen’s size; one more tap sends it away.

Values to change

NameFileDefaultWhat it changes
ACCENTscript.js#ff5a36The colour of the app on the screen and of the dot in the button.
HOLDscript.js2.4How many seconds the thumbnail waits in the corner before leaving.
SHRINKscript.js0.7How long the capture takes to shrink into the thumbnail.
SIZEscript.js0.3How large the thumbnail is compared with the screen.

Try them in the Playground

When to use it

On the page of a capture app, a browser extension or a bug reporting tool; in an operating system’s guide; and wherever something gets saved and has to show itself for a moment before going: a photo just taken, a scan, an exported file.

On phones

The screen is at most 316 pixels wide and 208 tall, and gets lower on low screens; with button and count the piece is about 280 pixels tall. The thumbnail, at 30%, stays almost 95 pixels wide: easy to tap.

With reduced motion

No flash and no springs: the thumbnail fades in already in the corner, waits and fades out; tapped, it is large in the middle at once. The demo’s pointer does not start.

Pitfalls

  • The full-screen white flash happens once and lasts half a second; with reduced motion it is not there, since a flash can be unpleasant.
  • The thumbnail is a real button, reachable from the keyboard only while it is showing; the copy inside is hidden from screen readers.
  • The white edge is a shadow that shrinks with the scale: when the capture is in the corner CSS thickens it, otherwise at 30% it would vanish.

Libraries

GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.

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

Testing

Tested on 26 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 animations