
The star rating
Ratings, SVG, Hover
The Copy my email button of the portfolio of a made-up design studio, Ondine: a dark pill with an envelope in a round well, the label and the address under it. On the click the address gets selected, a paper copy of it peels off the pill with its shadow, flies over the envelope folding narrow and drops in, behind the pocket; the flap closes, an apricot seal stamps on its tip, the two-sheet icon becomes a tick and the label rolls to Copied. The address really goes on the clipboard.
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>
<!--
"Copy email 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 Copy email button with the address that peels off and folds into the envelope</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fontsource-variable/mona-sans@5.3.0/index.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fontsource-variable/geist-mono@5.3.0/index.css">
<link rel="stylesheet" href="style.css">
</head>
<body>
<main class="stage">
<!-- the Copy email button of a made-up design studio, Ondine: on the click the address is selected, a paper copy of
it peels off the pill, folds and drops into the envelope, the flap closes on a seal and the label rolls to
Copied. The address really goes on the clipboard. -->
<div class="wrap" data-wrap>
<div class="pill" data-pill>
<span class="skin" aria-hidden="true">
<span class="skin__light" data-light></span>
<span class="skin__sweep" data-sweep></span>
</span>
<button class="btn" type="button" data-copy data-autoclic aria-label="Copy the email address hello@ondine.studio">
<span class="well" aria-hidden="true">
<span class="well__disc" data-disc></span>
<!-- the back of the envelope and its flap, behind the paper slip -->
<svg class="env env--back" data-env viewBox="0 0 28 28">
<path class="env__body" d="M5 10.2h18v10.6a1.8 1.8 0 0 1-1.8 1.8H6.8A1.8 1.8 0 0 1 5 20.8Z"></path>
<path class="env__flap env__flap--up" data-flapup d="M5.4 10.2 14 3.8l8.6 6.4Z"></path>
</svg>
<!-- the front pocket and the closed flap, in front of the slip -->
<svg class="env env--front" data-env viewBox="0 0 28 28">
<path class="env__pocket" d="M5 13.2 14 19.2l9-6v7.6a1.8 1.8 0 0 1-1.8 1.8H6.8A1.8 1.8 0 0 1 5 20.8Z"></path>
<path class="env__seam" d="M5.7 22 11.8 17.4M22.3 22 16.2 17.4"></path>
<path class="env__flap env__flap--down" data-flapdown d="M5.4 10.2 14 16.6l8.6-6.4Z"></path>
</svg>
<svg class="seal" data-seal viewBox="0 0 28 28">
<rect x="10.6" y="13" width="6.8" height="6.8" rx="2.2" transform="rotate(45 14 16.4)"></rect>
<path d="M12.3 16.5 13.5 17.7 15.8 15.2"></path>
</svg>
</span>
<span class="txt">
<span class="txt__win"><span class="txt__now" data-label>Copy my email</span></span>
<span class="txt__win txt__win--sub">
<span class="txt__sel" data-sel></span>
<span class="txt__now" data-addr>hello@ondine.studio</span>
</span>
</span>
<span class="copyicon" aria-hidden="true">
<svg viewBox="0 0 20 20">
<rect class="copyicon__back" data-sq1 x="3.2" y="3.2" width="9.6" height="9.6" rx="2.4"></rect>
<rect class="copyicon__front" data-sq2 x="7.2" y="7.2" width="9.6" height="9.6" rx="2.4"></rect>
<path class="copyicon__tick" data-tick d="M5 10.4 8.4 13.6 15.2 6.6"></path>
</svg>
</span>
</button>
<!-- the paper copy of the address that peels off and goes into the envelope -->
<span class="slip" data-slip aria-hidden="true">
<span class="slip__mark">@</span><span class="slip__text" data-sliptext>hello@ondine.studio</span>
</span>
</div>
<span class="sr" aria-live="polite" data-live></span>
</div>
</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.
23 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 “Copy email button” from Animorio and fit it into my siteThe envelope is two stacked SVGs in the well: behind, the body and the open flap; in front, the filled pocket and the closed flap. The slip is a sibling with the z-index in between. For it to really pass behind the pocket, neither the well nor the button has a transform or an opacity: they would make their own stacking context and the slip would sit always above or always below. The envelope’s bump moves the two SVGs together.
At every click the slip goes back to no transform, is measured, and is laid with x and y in pixels so that its text sits exactly over the address in the pill: as it peels off it looks like the same writing lifting, while the original stays. Sizes are read again at every click, so they hold at any width.
Two flaps instead of one that turns: the closed one, in front, squashes with scaleY from its top edge; the open one, behind, grows from the edge upwards with a back.out. So the open flap sits behind the slip and the closed one in front, without changing z-index mid-animation.
Label and address each sit in a one-line window: the new text comes in from below on a spring, the old one leaves at the top and at the end takes the new text, so the data attributes stay on the same element and lines never pile up.
Only a real click (event.isTrusted) calls navigator.clipboard.writeText, inside a try and with the promise’s catch: the autopilot makes the gesture without asking for clipboard permission, and where there is no clipboard the gesture runs anyway.
| Name | File | Default | What it changes |
|---|---|---|---|
EMAIL | script.js | hello@ondine.studio | The address that really gets copied. |
LABEL | script.js | Copy my email | The label of the button at rest. |
DONE | script.js | Copied | The label once the address is on the clipboard. |
HINT | script.js | Paste it in any mail app | The line under it once it has copied. |
LIFT | script.js | 1 | How high the slip lifts before flying into the envelope. |
SPRING | script.js | 1 | How much the envelope and the pill bounce. |
HOLD | script.js | 2.2 | The seconds Copied stays before going back to rest. |
IDLE | script.js | 1.1 | The seconds before the autopilot starts. |
--accento | style.css | #ff7a4d | The colour of the selection, the seal and the tick. |
On the contact page or in the footer of the portfolio of a designer, a photographer, an illustrator, an architect or a studio: visitors copy the address in one click instead of opening a mail app they may not use, and the gesture says it worked.
The pill takes almost the whole width and sizes shrink with the type; the finger taps like the mouse and the slip makes the same flight. Without hover the light stays off and the flap still.
No flight or springs: the selection appears and fades, the envelope stays closed and the seal fades in, the icon becomes the tick already drawn and the lines change with a fade. The address still gets copied.
GSAP 3.15.0, Mona Sans (font variabile) 5.3.0, Geist Mono (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 7.6 KB; the libraries: GSAP 28 KB.
Tested on 15 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.