Skip to content
animorio
IT
All components

Halloween event card

Cards, HoverGSAPMediumCompressed weight: Demo 7.3 KBGSAP 28 KBFreeDownload the zip

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.

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>
<!--
  "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>

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.

30 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 “Halloween event card” 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 black background there is only a card, dark, with rounded corners: the midnight screening of a made-up open-air cinema, Harbour Lawn. At the top a small line, then the big narrow title, Midnight Screening; below it the date, Oct 31, in orange, the time the doors open and the time of the film; a row with the film’s title, The Lantern House, and its running time; at the bottom the price and the light Get tickets button with its arrow. Hover it and the card rises by two pixels, and in the top right corner a warm light, like moonlight, barely comes on. From the corner the spokes of the web set out, one after the other, hair-thin threads that stretch, bend by a few pixels and spring taut again; then the spiral, turn after turn from the middle outwards, each strand gently curved towards the corner like real silk, and on the outer threads four or five drops of dew light up and glint softly. Meanwhile, from the point of the web above the button, a little spider made of a few lines drops down, with a pale body and a small orange mark on its back: its legs paddle as it goes, it arrives above Get tickets, swings on its line and stops; the button feels it, swells for a moment and the arrow takes a step forward. Leave the card and the spider climbs quickly back up its line and the web pulls back, outer turns first, then the spokes. A drawn pointer comes in, waits for the spider, goes over the button and leaves, by itself, until you touch the demo.

How it works

One state, one drawing

Every 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.

Threads stretch with pathLength

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.

The bounce of silk

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 spider on its line

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.

Measured from the real card

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.

Values to change

NameFileDefaultWhat it changes
WEB_SIZEscript.js0.6How big the web is, compared with the card’s short side.
THREADSscript.js7How many spokes the web has.
RINGSscript.js6How many turns of spiral the web has.
DRAWscript.js0.26How long one thread takes to stretch, in seconds.
DROPscript.js1.2How long the spider takes to drop, in seconds.
SWINGscript.js9How far the spider swings when it arrives, in pixels.
ACCENTscript.js#ff7a1aThe colour of the date and of the mark on the spider.

Try them in the Playground

When to use it

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.

On phones

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.

With reduced motion

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.

Pitfalls

  • If each thread has its own stroke-dashoffset tween and its curve changes, its length changes and the stroke jumps: with pathLength=1 the dash is always as long as the thread.
  • The web layer sits above the content: without pointer-events: none it steals the click from the button.
  • The spider has to find the button: the point it hangs from must be measured from the real card, not written in pixels, or on a phone it drops into thin air.

Libraries

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.

Testing

Tested on 30 October 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