Skip to content
animorio
IT
All components

Submit application button

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

The Submit application button at the end of a job application at Ostrand, a made-up company, on white, with the attached CV beside it in a small card. Pressed, the sheet leaves the card, folds in three like a letter, slips into an envelope drawn in lines that closes its flap; the envelope leaves on an arc and vanishes into a thread of light, the button becomes Application sent with a drawn check and We’ll reply within 5 days rises below.

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>
<!--
  "Submit application 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 Submit application button with the CV that folds into the envelope</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">
    <!-- the last step of a job application at a made-up company, Ostrand: the attached CV sits beside the Submit
         application button. Pressed, the sheet lifts out of its card, folds in three like a letter, slips into an
         envelope drawn in lines, the flap closes, the envelope leaves on an arc and vanishes into a thread of light,
         and the button turns into Application sent while the line below rises -->
    <div class="wrap" data-wrap>

      <!-- the air above the row, where the sheet folds and the envelope flies -->
      <div class="air" data-air aria-hidden="true">
        <svg class="env__flap" data-flap viewBox="0 0 76 52"><path data-flappath d="M2.5 2.5 L38 -20 L73.5 2.5"></path></svg>

        <div class="sheet" data-sheet>
          <div class="sheet__panel sheet__top" data-ptop>
            <div class="sheet__face sheet__front">
              <span class="sheet__name"></span>
              <span class="sheet__role"></span>
              <span class="sheet__rule"></span>
            </div>
            <div class="sheet__face sheet__back"></div>
          </div>
          <div class="sheet__panel sheet__mid">
            <div class="sheet__face sheet__front">
              <span class="sheet__head"></span>
              <span class="sheet__line"></span>
              <span class="sheet__line sheet__line--short"></span>
            </div>
          </div>
          <div class="sheet__panel sheet__bot" data-pbot>
            <div class="sheet__face sheet__front">
              <span class="sheet__head"></span>
              <span class="sheet__line"></span>
              <span class="sheet__line sheet__line--mid"></span>
            </div>
            <div class="sheet__face sheet__back"></div>
          </div>
        </div>

        <svg class="env__body" data-envbody viewBox="0 0 76 52">
          <rect class="env__paper" data-envpaper x="1" y="1" width="74" height="50" rx="4"></rect>
          <rect class="env__line" data-envrect x="1" y="1" width="74" height="50" rx="4" pathLength="1"></rect>
          <path class="env__line env__line--thin" data-envv d="M2.5 49.5 L30 27 M73.5 49.5 L46 27" pathLength="1"></path>
        </svg>

        <span class="trail" data-trail></span>
      </div>

      <div class="row">
        <div class="file" data-file>
          <span class="file__ic" data-fileic>
            <svg class="file__sheet" data-filesheet viewBox="0 0 24 28" aria-hidden="true">
              <path d="M5 1.5h9.2L20.5 7.8V24a2.5 2.5 0 0 1-2.5 2.5H5A2.5 2.5 0 0 1 2.5 24V4A2.5 2.5 0 0 1 5 1.5Z"></path>
              <path class="file__corner" d="M14 1.8V6a2 2 0 0 0 2 2h4.2"></path>
              <path class="file__lines" d="M7 14h10M7 18.5h6.5"></path>
            </svg>
            <svg class="file__empty" data-fileempty viewBox="0 0 24 28" aria-hidden="true">
              <path d="M5 1.5h9.2L20.5 7.8V24a2.5 2.5 0 0 1-2.5 2.5H5A2.5 2.5 0 0 1 2.5 24V4A2.5 2.5 0 0 1 5 1.5Z"></path>
            </svg>
          </span>
          <span class="file__txt">
            <span class="file__name" data-filename>CV_Rina_Okafor.pdf</span>
            <span class="file__meta"><span class="file__metain" data-filemeta>PDF · 240 KB</span></span>
          </span>
        </div>

        <button class="send" type="button" data-send data-autoclic>
          <span class="send__floor" aria-hidden="true"></span>
          <span class="send__clip">
            <span class="send__sheen" data-sheen aria-hidden="true"></span>
            <span class="send__label" data-label>
              <span class="send__state send__idle" data-idle>
                <span class="send__word" data-word>Submit application</span>
                <svg class="send__arrow" data-arrow viewBox="0 0 24 24" aria-hidden="true"><path d="M5 12h13M13 6.5 18.5 12 13 17.5"></path></svg>
              </span>
              <span class="send__state send__busy" data-busy aria-hidden="true">
                <span class="send__word">Sending</span>
              </span>
              <span class="send__state send__done" data-done aria-hidden="true">
                <svg class="send__check" viewBox="0 0 24 24"><circle data-ring cx="12" cy="12" r="9"></circle><path data-check d="M7.8 12.4 10.8 15.4 16.4 9.2"></path></svg>
                <span class="send__word" data-doneword>Application sent</span>
              </span>
            </span>
            <span class="send__track" aria-hidden="true"><span class="send__run" data-run></span></span>
          </span>
          <span class="send__edge" aria-hidden="true"></span>
        </button>
      </div>

      <p class="note"><span class="note__in" data-note>Product Designer · Ostrand</span></p>
      <p class="sr" data-live aria-live="polite"></p>
    </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.

25 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 “Submit application 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 a white background there are just two pieces in a row. On the left a small white card as tall as the button, with a hairline edge and a soft shadow: inside a light grey tile with the sheet icon, its folded corner and two blue lines, the name CV_Rina_Okafor.pdf and below PDF · 240 KB. On the right the dark Submit application pill with its arrow, the body fading from charcoal to near black, a thread of light on the top edge and layered shadows. Below, in grey, Product Designer · Ostrand. On hover the card’s sheet lifts by a pixel and the label widens on the wdth axis; pressed, the button gives a pixel and springs back. On send the arrow slides away, the label becomes Sending and a thin light runs back and forth along the bottom of the button. The sheet leaves the icon, which stays as a dashed outline, and rises into the air growing with a sway: you can see the name, the role in blue and the CV’s lines. Then it folds in three like a letter: first the bottom third rises onto the middle, then the top one comes down, each showing its greyer back, a shade passing over the paper and a little settle. Under the sheet an envelope draws itself in lines, the rectangle and the two diagonals, and its flap opens into a triangle; the letter lifts a breath and drops in, the envelope takes its weight, the flap closes over it. Meanwhile the card’s line says Attaching and then Sealed. The envelope crouches, leaves on an arc up to the right, shrinks, and flattens into a thread of blue light that stretches and fades. The button becomes Application sent: the ring draws itself, then the check, a shine crosses it and it gives a small jolt; below, We’ll reply within 5 days rises and the card says Sent · 240 KB. After a moment everything goes back to rest and the sheet drops back into its icon with a bounce. A drawn pointer plays the loop on its own.

How it works

The sheet leaves the icon

The big sheet (60 by 78 pixels, three panels 26 tall) starts exactly over the card’s icon, scaled down to the icon’s size: position and scale are measured with getBoundingClientRect on every send. x runs on power3.inOut, y on back.out and the scale on power3.out, so the sheet rises in a small arc and settles.

The tri-fold

The bottom panel turns 180 degrees in rotationX around its top edge, the top one -180 around its bottom edge, with transformPerspective. Halfway through the front switches off and the grey back switches on, and the --shade variable darkens the paper like a passing shadow.

The layered envelope

The envelope is two SVGs: the body (white fill, rectangle and diagonals drawn with pathLength 1 and strokeDashoffset) sits above the letter, the flap sits below it while open. The flap changes shape by animating its d attribute (same commands, different numbers) and halfway through closing it moves in front with a class.

The arc and the thread of light

x on power2.in and y on power3.out, together, make an arc that rises and then runs to the right. At the end the envelope flattens in scaleY while a faded strip with a blue glow stretches from the arrival point and pulls back into it.

One button, three states

Submit application, Sending and Application sent share one grid cell; the button takes the width of the longest, so nothing shifts. Each change leaves upwards and comes back from below on back.out; the ring and the check draw themselves with strokeDashoffset.

Values to change

NameFileDefaultWhat it changes
LABELscript.jsSubmit applicationThe button’s label at rest.
DONE_LABELscript.jsApplication sentThe label once the application has gone.
FILE_NAMEscript.jsCV_Rina_Okafor.pdfThe name of the attached CV.
FILE_SIZEscript.js240 KBThe file size, under the name.
ROLEscript.jsProduct Designer · OstrandThe line below before sending: the role and the company.
REPLYscript.jsWe’ll reply within 5 daysThe line that rises once the application is sent.
ACCENTscript.js#4f6bffThe colour of the light, the check and the CV’s lines.
FOLDscript.js0.42How many seconds each fold of the sheet lasts.
FLIGHTscript.js0.8How many seconds the envelope’s flight lasts.
HOLDscript.js2.4How many seconds Application sent stays before going back to rest.

Try them in the Playground

When to use it

At the end of the application form on a careers page, on a job board, on a startup’s careers page or in an app for applying to jobs: wherever you want the person sending a CV to see that it has really gone.

On phones

Below 440 pixels the CV card moves above the button, centred, and the sheet and envelope fly in the lower space above them; the flight shortens to the screen width. A finger presses like the mouse; without hover the sheet does not lift.

With reduced motion

No flights, folds or springs: the labels cross-fade, the envelope appears already sealed and fades in the middle, the ring and check arrive already drawn and the line below changes without rising.

Pitfalls

  • The rolling lines were made of to, call and fromTo chained without positions: in an already long timeline the call and fromTo landed at the end and the line stayed gone for the whole send. Each piece now has its explicit position.
  • An envelope inside a transformed container creates a stacking context and the letter cannot pass between body and flap: body and flap are two SVG siblings of the letter, placed with left and top, and move together only once the letter is inside.
  • A small y bump after each fold fought the y move that lifts the letter above the envelope: the fold’s settle is now a rotation of less than a degree.
  • The button’s three labels have different lengths and the row shifted at every change: the button takes one width, the longest, measured again once the typeface arrives.
  • Sizes (the starting icon, the centre of the flight, the arrival) are measured on every send and the envelope is placed again on resize, because the demo window changes width and height while you watch.

Libraries

GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.

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

Testing

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