
The elastic button
Buttons, Hover, Text
The card of an open-air screening on Halloween night, with a single gesture: hover it and a cobweb of hair-thin threads stretches from the top right corner, first the spokes and then the spiral, each thread with a small bounce, and a little spider made of a few lines drops on its line, swings and stops above Get tickets. Leave and the spider climbs back while the web pulls away. Minimal style, black and a single orange.
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>
<!--
"Halloween event card" 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 event card with a cobweb stretching from the corner</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: hover. The card of an open-air screening on Halloween night: on hover a cobweb stretches
from the top right corner, thread by thread, and a small spider drops on its line down to the button;
leave the card and the web pulls back while the spider climbs home -->
<article class="card" data-card tabindex="0" aria-label="Midnight Screening, October 31 at 23:30">
<div class="card__glow" aria-hidden="true"></div>
<p class="card__kicker">Harbour Lawn · Open-air cinema</p>
<h1 class="card__title">Midnight<br>Screening</h1>
<dl class="card__meta">
<div><dt>Date</dt><dd class="card__date">Oct 31</dd></div>
<div><dt>Doors</dt><dd>23:00</dd></div>
<div><dt>Film</dt><dd>23:30</dd></div>
</dl>
<p class="card__film"><span>The Lantern House</span><span class="card__runtime">1964 · 92 min</span></p>
<footer class="card__foot">
<span class="card__price"><span class="card__from">From</span> $14</span>
<button class="cta" type="button" data-cta>
<span class="cta__fill" aria-hidden="true"></span>
<span class="cta__label">Get tickets</span>
<svg class="cta__arrow" viewBox="0 0 16 16" aria-hidden="true"><path d="M3 8h9.5M8.6 4l4 4-4 4"></path></svg>
</button>
</footer>
<!-- the web and the spider, drawn by the script -->
<svg class="web" data-web aria-hidden="true">
<g data-threads></g>
<g data-dew></g>
<line class="silk" data-silk x1="0" y1="0" x2="0" y2="0"></line>
<g class="spider" data-spider>
<g data-legs></g>
<ellipse class="spider__body" cx="0" cy="3.2" rx="3.3" ry="4.1"></ellipse>
<circle class="spider__head" cx="0" cy="-2" r="2.1"></circle>
<path class="spider__mark" d="M-1.1 1.6h2.2l-1.1 1.6 1.1 1.6h-2.2l1.1-1.6Z"></path>
</g>
</svg>
</article>
<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 “Halloween event card” from Animorio and fit it into my siteEvery thread is a number: how much is drawn and how much it bends. GSAP only moves those numbers; every frame one function redraws all the SVG paths, so entering and leaving can stop halfway and carry on from where they are.
Every thread has pathLength=1: the stroke-dasharray is 1 1 and the stroke-dashoffset goes from 1 to 0, whatever its real length, even while its curve changes.
Each spoke is a quadratic Bézier with its control point pushed to one side: as soon as it is drawn the push goes from 7 pixels to zero with elastic.out, and the thread quivers and goes taut. The strands of the spiral bend towards the corner the same way.
The length of the line goes down with power2.out; the swing is a damped wave worked out from the time, which tilts the spider too. The legs are eight two-segment lines that paddle only while it moves.
The corner, the size of the web and the point above the button are measured from the card and redone on resize: the web always finds the button, at any width.
| Name | File | Default | What it changes |
|---|---|---|---|
WEB_SIZE | script.js | 0.6 | How big the web is, compared with the card’s short side. |
THREADS | script.js | 7 | How many spokes the web has. |
RINGS | script.js | 6 | How many turns of spiral the web has. |
DRAW | script.js | 0.26 | How long one thread takes to stretch, in seconds. |
DROP | script.js | 1.2 | How long the spider takes to drop, in seconds. |
SWING | script.js | 9 | How far the spider swings when it arrives, in pixels. |
ACCENT | script.js | #ff7a1a | The colour of the date and of the mark on the spider. |
For the Halloween event of a cinema, a bar, a museum or a party: the programme card that gets noticed without changing style. Without the spider, the stretching web also suits an autumn card or an old archive.
The same card at the width of the screen, with the title and spacing measured on height too; with no hover, a tap on the card stretches the web and another pulls it back, while the button stays a button.
No threads drawing themselves and no spider dropping: the web and the spider appear already in place with a fade, and the drawn pointer does not run.
GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 7.3 KB; the libraries: GSAP 28 KB.
Tested on 30 October 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.