Skip to content
animorio
IT
Back to the library

Umbrella headline

Hover, PhysicsGSAP, CanvasMediumCompressed weight: Demo 9.4 KBGSAP 28 KBFreeDownload the zip

A fine rain falls on the headline of a made-up umbrella maker and the pointer holds an umbrella drawn like a real one, swinging from the hand like a pendulum on a spring. The drops bounce off the canopy, run down the gores and drip off the rim; the letters under the umbrella stay dry, the others collect drops that swell and slide down. Click and the umbrella closes and snaps open again on its spring.

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>
<!--
  "Umbrella headline" 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>Harrowgate &amp; Co., umbrellas made for the rain</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>
  <!-- the opening of a made-up umbrella maker: a fine rain falls over the headline, the pointer holds an umbrella that
       sways like a pendulum on a spring, the drops bounce off its canopy and run down to the rim, the letters under it
       stay dry while the others collect drops that slide down. Click and it closes and snaps open again. -->
  <main class="stage" data-palco>
    <canvas class="tela" data-tela aria-hidden="true"></canvas>
    <p class="marchio">Harrowgate &amp; Co. <span>Umbrellas since 1911</span></p>
    <h1 class="titolo">Made for the rain.</h1>
    <p class="sotto">Hand-sewn canopies, steam-bent ash handles.</p>
    <p class="aiuto" aria-hidden="true">Move to shelter the words, click to close and open</p>
  </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.

21 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 “Umbrella headline” 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 rain-grey background is the opening page of Harrowgate & Co., a made-up umbrella maker: the brand at the top, the big headline «Made for the rain.» and below it a line about the hand-sewn umbrellas. A fine, slightly slanted rain falls over the whole page. The pointer holds an umbrella drawn like a real one, open: eight gores of dark red waxed cotton stretched between the ribs, each lit according to how it faces the light, the scalloped, stitched hem, the seams over the ribs, the metal tips, the ferrule on top, the steel shaft with its runner and the stretchers under the cloth, and the curved ash handle with its grain and brass collar. The umbrella hangs from the hand: when the hand moves the canopy lags behind and then comes back, like a pendulum on a spring, and it sways slightly even when still. The drops that hit the canopy splash, some run down a gore to the rim and fall off. The letters under the umbrella stay dry and the drops already on them dry up; outside, drops land on the letters, swell, grow heavy and slide down leaving a glossy trail. A click closes the umbrella, which folds up narrow and lets the rain through, and another snaps it open: the spring pushes it past its shape, the cloth shivers and settles. If nobody touches it, the umbrella strolls over the headline on its own and once closes and opens again.

How it works

An umbrella on a canvas

Everything is drawn on a 2D canvas. The umbrella lives in its own coordinates, with the centre of the rim at the origin: the shaft goes down to the hand, and the whole thing turns around the hand by the angle of the pendulum.

The gores

Eight ribs turn around the shaft; the front ones show. Each gore is the cloth between two ribs, closed at the bottom by a scallop that rises between the tips; its colour comes from how much it faces the light from the upper left.

Rain on the canopy

Each drop is brought into the umbrella’s coordinates: if it crosses the dome it splashes and sometimes becomes a rivulet that runs down the gore to the rim and falls.

The dry letters

The headline is drawn once on a separate canvas, from which the points inside the letters are taken. Drops land only outside the sheltered area, the strip under the rim slanted like the rain; inside that strip the drops dry up.

Values to change

NameFileDefaultWhat it changes
RAINscript.js240How many raindrops fall per second over the whole page.
WINDscript.js7How many degrees the rain leans.
SIZEscript.js1The size of the umbrella.
SWAYscript.js1How much the umbrella swings when the hand moves.
SNAPscript.js260The stiffness of the spring that opens the canopy: higher snaps harder.
BEADSscript.js14How many drops per second land on the letters.

Try them in the Playground

When to use it

For the opening page of an umbrella shop, a waterproof clothing brand, a weather app or a hotel in a rainy city; whenever a headline should make you feel the weather and invite you to play with the pointer.

On phones

The same animation with sizes adapted to width and height: the umbrella follows the finger, and a tap closes and opens it.

With reduced motion

No motion: the rain stands still like in a photo, the umbrella is open over the headline with the letters outside already wet; a click opens and closes it without animation.

Pitfalls

  • The headline drawn on canvas waits for document.fonts.ready, otherwise it is drawn with the fallback font and the drops land in the wrong places.
  • The sheltered area follows the slant of the rain: without it, letters just outside the rim stay dry by mistake.
  • The push of the pendulum comes from the hand’s acceleration, not its speed: with the speed the umbrella would stay tilted as long as the hand moves.
  • All sizes are in pixels: headline, letter points and umbrella are recalculated on resize.

Libraries

GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.

Compressed with gzip, the three demo files weigh 9.4 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 animations