
The elastic button
Buttons, Hover, Text
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.
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>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
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 siteThe 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 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 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.
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.
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.
| Name | File | Default | What it changes |
|---|---|---|---|
LABEL | script.js | Submit application | The button’s label at rest. |
DONE_LABEL | script.js | Application sent | The label once the application has gone. |
FILE_NAME | script.js | CV_Rina_Okafor.pdf | The name of the attached CV. |
FILE_SIZE | script.js | 240 KB | The file size, under the name. |
ROLE | script.js | Product Designer · Ostrand | The line below before sending: the role and the company. |
REPLY | script.js | We’ll reply within 5 days | The line that rises once the application is sent. |
ACCENT | script.js | #4f6bff | The colour of the light, the check and the CV’s lines. |
FOLD | script.js | 0.42 | How many seconds each fold of the sheet lasts. |
FLIGHT | script.js | 0.8 | How many seconds the envelope’s flight lasts. |
HOLD | script.js | 2.4 | How many seconds Application sent stays before going back to rest. |
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.
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.
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.
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.
Tested on 13 November 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.