
The funnel context menu
Menus, Transitions, SVG, Hover
The Subscribe button of an invented newsletter, Low Tide Notes, in graphite on black with an edge that catches the light and a cream paper envelope drawn in its tip. Pressed, the pill opens on a spring into the email field and the envelope sits ajar, waiting. On send the address folds into the letter, the letter rises and drops into the envelope, the flap shuts, the apricot stamp lands with a tap, then the envelope crouches and leaves on a diagonal with a thin trail, while the pill closes on “You’re in” with a check drawing itself and the reader count rolling up by one.
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>
<!--
"Envelope subscribe 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 newsletter Subscribe button with the envelope that seals and flies off</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">
<!-- one gesture: subscribe. The Subscribe pill of an invented newsletter opens on a spring into the email field;
on send the address folds into a letter, drops into the drawn envelope, the flap shuts, a stamp lands and the
envelope leaves on a diagonal with a thin trail, while the pill closes on «You're in» -->
<section class="pezzo" data-pezzo aria-label="Subscribe to Low Tide Notes">
<div class="aria" aria-hidden="true">
<svg class="scia" data-scia-svg>
<defs>
<linearGradient id="scia-tinta" gradientUnits="userSpaceOnUse" data-scia-grad>
<stop offset="0" stop-color="var(--accento)" stop-opacity="0"></stop>
<stop offset="1" stop-color="var(--accento)" stop-opacity="0.85"></stop>
</linearGradient>
</defs>
<path class="scia__via" data-via d="M0 0"></path>
<path class="scia__riga" data-scia d="M0 0" stroke="url(#scia-tinta)"></path>
<path class="scia__riga scia__riga--fine" data-scia2 d="M0 0"></path>
</svg>
</div>
<div class="pill" data-pill>
<span class="pill__glow" data-glow aria-hidden="true"></span>
<span class="pill__shine" data-shine aria-hidden="true"></span>
<button class="pill__layer pill__rest" type="button" data-rest aria-expanded="false" data-autoclic>
<span class="pill__label" data-label>Subscribe</span>
</button>
<form class="pill__layer pill__form" data-form novalidate>
<label class="sr" for="email">Email address</label>
<span class="pill__field" data-field>
<input id="email" data-input type="email" inputmode="email" autocomplete="email" spellcheck="false"
placeholder="Your email address" aria-describedby="nota">
</span>
<button class="pill__send" type="submit" data-send aria-label="Send">
<svg viewBox="0 0 16 16" aria-hidden="true"><path d="M3 8h9.2M8.6 4.4 12.2 8l-3.6 3.6"></path></svg>
</button>
</form>
<button class="pill__layer pill__done" type="button" data-done tabindex="-1">
<svg class="pill__tick" viewBox="0 0 16 16" aria-hidden="true"><path data-tick d="M3.4 8.5 6.5 11.4 12.6 4.8" pathLength="1"></path></svg>
<span class="pill__done-text" data-done-text>You’re in</span>
</button>
</div>
<svg class="busta" data-busta viewBox="-2 -16 44 46" aria-hidden="true">
<defs>
<linearGradient id="carta" x1="0" y1="0" x2="0" y2="1">
<stop offset="0" stop-color="var(--carta-alta)"></stop>
<stop offset="1" stop-color="var(--carta-bassa)"></stop>
</linearGradient>
<linearGradient id="lembo" x1="0" y1="0" x2="0" y2="1">
<stop offset="0" stop-color="var(--carta-alta)"></stop>
<stop offset="1" stop-color="var(--carta-lembo)"></stop>
</linearGradient>
</defs>
<g data-corpo>
<rect class="busta__dentro" x="1" y="1" width="38" height="26" rx="3"></rect>
<path class="busta__lembo-dietro" data-lembo-dietro d="M1.6 1.4 H38.4 L20 16 Z"></path>
<g class="busta__lettera" data-lettera>
<rect x="5" y="4" width="30" height="21" rx="1.6"></rect>
<path d="M9 9.5h14M9 13h20M9 16.5h17"></path>
</g>
<path class="busta__tasca" d="M1 5.4 L20 17.2 L39 5.4 V24 a3 3 0 0 1 -3 3 H4 a3 3 0 0 1 -3 -3 Z" fill="url(#carta)"></path>
<path class="busta__piega" d="M1.8 26 L16.4 15.2 M38.2 26 L23.6 15.2"></path>
<path class="busta__lembo" data-lembo d="M1.6 1.4 H38.4 L20 16 Z" fill="url(#lembo)"></path>
<g class="busta__bollo" data-bollo>
<rect x="29.2" y="18.4" width="6.6" height="5.8" rx="0.8"></rect>
<path d="M30.6 22.6 32 20.6l1.2 1.3 1.1-0.9"></path>
</g>
</g>
</svg>
<p class="nota" id="nota" data-nota aria-live="polite">
<span class="nota__riga" data-riga-ok>Low Tide Notes · Join <span class="num" data-num>4,210</span> readers</span>
<span class="nota__riga nota__riga--err" data-riga-err></span>
<span class="nota__riga nota__riga--yay" data-riga-yay>First letter on Friday · reader <span class="num" data-num2>4,211</span></span>
</p>
</section>
<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.
30 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 “Envelope subscribe button” from Animorio and fit it into my siteThe pill holds three stacked layers, the Subscribe button, the form with the input type=email and the send key, and the confirmation button: one shows at a time, with pointer-events and tabIndex only on the live one, and GSAP takes the pill’s width to the measured width of the new state with back.out, so every change is a spring.
The envelope is an SVG outside the pill (so it can fly away) and sits 31 pixels from its left edge: on every width update a function reads the current width and puts the envelope back in place, plus the lift, scale and tilt offsets kept in a single object.
The flap is a triangle whose tip moves from 16 (shut) to -13 (open). The same path is drawn twice, behind the letter and in front of the pocket: while the tip is above the envelope’s edge the back one shows, so the letter drops in front of the open flap and the shut flap covers it.
At take-off a quadratic curve is written from the envelope up to the right, measured on the piece’s real width; the envelope travels it with getPointAtLength and power2.in, takes its tilt from the tangent, and the trail is the same path with a 46 pixel dash whose stroke-dashoffset always ends under the envelope.
Each figure is a column from 0 to 9 in a one-line window: once subscribed only the columns that change move, 60 ms apart, with a small overshoot.
| Name | File | Default | What it changes |
|---|---|---|---|
ACCENT | script.js | #ff9b6a | The colour of the stamp, the send key, the check and the trail. |
READERS | script.js | 4210 | How many readers the newsletter already has: subscribing adds one. |
SPRING | script.js | 0.75 | How long the spring that opens and closes the pill lasts, in seconds. |
FLIGHT | script.js | 1.05 | How long the envelope’s flight lasts, in seconds. |
TILT | script.js | 16 | The most degrees the envelope tilts by in flight. |
HOLD | script.js | 2.6 | How many seconds “You’re in” stays before going back to Subscribe. |
TYPING | script.js | 0.06 | Seconds per letter when the pilot types the address. |
LABEL | script.js | Subscribe | The button’s label. |
DONE_LABEL | script.js | You’re in | The label once subscribed. |
LOOP | script.js | true | The pilot plays the story again until someone touches it. |
At the end of an article, in the footer of a blog, a magazine or a shop, on the landing page of a product collecting newsletter or waiting list sign-ups: wherever an always open email field would be too much and a button that opens when needed is enough.
The same 60 pixel pill, opened as wide as the box; the envelope flies on a curve measured on the real width, so it stays on screen. A finger taps like the mouse and the keyboard opens with the at sign ready (inputmode=email).
No springs, shakes or flight: the pill changes width at once and the layers cross-fade, on error only the edge and the line below change, and on send the envelope shuts in place and fades out slowly while the confirmation arrives.
GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 10 KB; the libraries: GSAP 28 KB.
Tested on 9 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.