Skip to content
animorio
IT
All components

Video export button

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

The Export button of a video editing app, a graphite pill on white. Pressed, it widens and a film strip with the coloured frames of the cut runs inside it: at the end they squeeze and slip into a small file, which fills with orange and twitches for every frame, while the percentage climbs and the size below grows to 248.6 MB. At 100% the file jumps out of the pill, which kicks back a little, and lands above it as a card with the thumbnail, the name cut_final.mp4 and the size; the pill says Exported with a tick that draws itself.

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>
<!--
  "Video export 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 Export button of a video editor with the frames that become the file</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 Export button of an invented video editor: press it and a strip of frames runs through the pill into a
         small file that fills up as they squeeze in; at 100% the file jumps out of the pill as a card with its name
         and size -->
    <div class="ex" data-export>
      <div class="ex__slot">
        <span class="ex__shadow" data-card-shadow aria-hidden="true"></span>
        <div class="file" data-card aria-hidden="true">
          <span class="file__thumb" data-thumb>
            <span class="file__frame"></span><span class="file__frame"></span><span class="file__frame"></span>
            <svg class="file__play" viewBox="0 0 12 12"><path d="M4 2.8v6.4L9.2 6z"></path></svg>
            <span class="file__time" data-dur>0:42</span>
          </span>
          <span class="file__text">
            <span class="file__name" data-name>cut_final.mp4</span>
            <span class="file__meta"><span data-size>248.6 MB</span> · 4K · H.264</span>
          </span>
          <svg class="file__open" viewBox="0 0 16 16"><path d="M6 3.5L10.5 8 6 12.5"></path></svg>
          <span class="file__shine" data-card-shine></span>
        </div>
      </div>

      <button class="pill" type="button" data-btn>
        <span class="pill__body" aria-hidden="true"></span>
        <span class="pill__grain" aria-hidden="true"></span>
        <span class="pill__sheen" data-sheen aria-hidden="true"></span>
        <span class="pill__rim" aria-hidden="true"></span>

        <span class="pill__layer pill__rest" data-rest>
          <svg class="ic ic--out" viewBox="0 0 24 24" aria-hidden="true">
            <path class="ic__tray" d="M4.5 13.5v4.2a1.8 1.8 0 0 0 1.8 1.8h11.4a1.8 1.8 0 0 0 1.8-1.8v-4.2"></path>
            <g class="ic__arrow"><path d="M12 15V4.5"></path><path d="M7.8 8.4L12 4.2l4.2 4.2"></path></g>
          </svg>
          <span class="pill__word">Export</span>
          <span class="pill__chip">MP4</span>
        </span>

        <span class="pill__layer pill__busy" data-busy aria-hidden="true">
          <span class="strip" data-strip>
            <span class="strip__band" data-band></span>
            <span class="strip__frames" data-frames></span>
          </span>
          <span class="doc" data-doc>
            <svg viewBox="0 0 20 24">
              <defs><clipPath id="doc-clip"><path d="M3 1.5h9.2L17 6.3V21a1.5 1.5 0 0 1-1.5 1.5h-12A1.5 1.5 0 0 1 2 21V3a1.5 1.5 0 0 1 1-1.5z"></path></clipPath></defs>
              <g clip-path="url(#doc-clip)"><rect class="doc__fill" data-doc-fill x="0" y="0" width="20" height="24"></rect></g>
              <path class="doc__line" d="M3.5 1.5h8.7L17 6.3v14.7a1.5 1.5 0 0 1-1.5 1.5h-12A1.5 1.5 0 0 1 2 21V3a1.5 1.5 0 0 1 1.5-1.5z"></path>
              <path class="doc__fold" d="M12 1.7V6.5h4.8"></path>
            </svg>
          </span>
          <span class="pill__pct" data-pct>0%</span>
        </span>

        <span class="pill__layer pill__done" data-done aria-hidden="true">
          <svg class="ic ic--ok" viewBox="0 0 24 24"><path data-tick d="M5.5 12.6l4.1 4.1L18.5 7.6"></path></svg>
          <span class="pill__word">Exported</span>
        </span>

        <span class="pill__bar" aria-hidden="true"><span class="pill__bar-in" data-bar></span></span>
        <span class="sr" data-live aria-live="polite">Export</span>
      </button>

      <p class="ex__hint"><span class="roll"><span class="roll__in" data-hint>4K · H.264 · 24 fps</span></span></p>
    </div>

    <svg class="pointer" viewBox="0 0 24 24" aria-hidden="true" data-pointer><path d="M5 3l14 8.2-6.2 1.4 3.6 6.8-2.6 1.4-3.6-6.8L5 18.6z"></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.

28 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 “Video export 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

At rest it is a 60 pixel graphite pill, its rim catching the light on top, a fine grain, the export icon, the word Export and an MP4 tag; hovering, a soft light follows the pointer and the arrow lifts. Pressed, the pill sinks and widens on a spring: on the left a film strip with sprocket holes runs with eighteen frames in the colours of the cut; near the file they squeeze and slip in, and the file twitches for every frame as it fills with orange from the bottom. On the right the percentage climbs, a thin line runs along the bottom and the size grows under the pill. At 100% the file swells and jumps out: it flies in an arc above the pill, grows into a white card with a three-shot thumbnail, the name and the size, lands with a small squash, its shadow arrives underneath and a glint runs across it. The pill kicks back, narrows again and says Exported with an orange tick drawing itself. Another click brings Export back.

How it works

The layers of the pill

The button holds absolutely positioned layers: the body with its graphite gradient, the grain made with an feTurbulence SVG as background, the light following the pointer (a radial-gradient moved with two CSS variables and gsap.quickTo) and the one pixel rim, a gradient masked down to a ring. On top sit three content layers: rest, exporting and done.

The strip driven by progress

A single number, the progress from 0 to 1, is tweened by GSAP over ENCODE seconds. On each update every frame is placed at its x along the strip; in the last pixels before the file its scaleX drops to 1 minus SQUEEZE and its scaleY by a third, origin on the right, so the frame squashes against the file. The band of sprocket holes moves by the same amount, modulo 7 pixels.

The file that fills and twitches

The file is an SVG with an orange rectangle clipped to its shape: the rectangle's y goes down with progress. Whenever the count of frames inside changes, the file gets a scale fromTo from 1.13 to 1 with back.out, one per frame.

The jump out of the pill

At 100% the centre of the file and the centre of the card's place above the pill are measured: the card starts there, small and turned, and x, y, scale and rotation each get their own tween and curve, so the flight makes an arc (y rises 16 pixels times JUMP and falls again). On landing, origin at the bottom, a 70 millisecond squash and an elastic.out; then the shadow and the glint.

The pilot

A drawn pointer passes over the pill (the light follows it), presses Export and moves away; it waits for the file to land, leaves the card for HOLD seconds and goes back to rest. At the first real tap or key the pilot stops, and starts again after nine seconds with nobody around.

Values to change

NameFileDefaultWhat it changes
FILE_NAMEscript.js"cut_final.mp4"The name of the file that jumps out.
SIZE_MBscript.js248.6The finished file size in MB.
ACCENTscript.js"#ff6a3d"The colour of the filling file, the bar and the tick.
ENCODEscript.js3.4Seconds of the export.
FRAMESscript.js18How many frames run in the strip.
SQUEEZEscript.js0.86How much the frames squeeze as they enter the file.
JUMPscript.js1How high the file jumps before it lands.
HOLDscript.js2.6Seconds the card stays out.
PAUSEscript.js1.2Seconds between pilot rounds.

Try them in the Playground

When to use it

In the toolbar of a video editor, a tool for reels or podcasts, an image editor or any app that produces a file: the button that exports and in the end hands over the result as a card to open.

On phones

The same animation with adapted sizes: the widened pill never goes past the screen width minus 28 pixels, and the strip is measured on that width. The card sits above the pill, inside the box. The finger taps just like the mouse.

With reduced motion

Nothing moves: the pill does not widen on a spring, the frames stay still, the percentage climbs and the file fills; at the end the card fades in at its place and the tick is already drawn. The pilot does not start.

Pitfalls

  • The pill changes width while the strip runs: the strip window is measured again on every update, otherwise the frames slipped into the file at an empty spot.
  • The card flight starts from the file measured at that moment (getBoundingClientRect), not from a fixed spot: the widened pill has another width on a phone.
  • scale and scaleX/scaleY on the same element: the landing squash starts only after the scale tween has finished, otherwise they overwrite each other.

Libraries

GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.

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

Testing

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