
The inchworm menu
Menus, Hover, Transitions
The moon card of Nimbo, a made-up weather app, in dark glass on black: the moon disc with its seas in soft greys and a true terminator shadow, a semicircle plus an elliptical arc, sliding to the day’s phase on a spring. Below, the phase name, the illuminated percentage counting up, moonrise and moonset, and a strip of the next seven days with tiny discs to drag through. The halo widens towards the full moon.
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>
<!--
"Moon phase 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>Moon phase card</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">
<!-- the moon card of a made-up weather app, Nimbo: the disc with the real terminator, the light that rolls,
the phase name, moonrise and moonset, and the next seven days to drag through -->
<section class="card" data-card aria-label="Moon phase">
<span class="card__rim" aria-hidden="true"></span>
<header class="head">
<p class="head__app">
<svg class="head__mark" viewBox="0 0 16 16" aria-hidden="true"><path d="M10.6 2.4a5.8 5.8 0 1 0 3 9.8 4.6 4.6 0 0 1-3-9.8Z"/></svg>
<span>Moon</span><span class="head__place">Lisbon</span>
</p>
<p class="head__date"><span class="roll" data-roll="date"><span class="roll__line">Wed, Nov 25</span></span></p>
</header>
<div class="sky" data-sky>
<span class="halo" data-halo aria-hidden="true"></span>
<svg class="moon" data-moon viewBox="0 0 200 200" role="img" aria-label="The moon tonight">
<defs>
<radialGradient id="mBase" cx="44%" cy="40%" r="62%">
<stop offset="0" stop-color="#eef1f5"/>
<stop offset=".62" stop-color="#c9ced6"/>
<stop offset="1" stop-color="#8f96a1"/>
</radialGradient>
<radialGradient id="mLimb" cx="50%" cy="50%" r="50%">
<stop offset=".72" stop-color="#000" stop-opacity="0"/>
<stop offset="1" stop-color="#1a2230" stop-opacity=".38"/>
</radialGradient>
<filter id="mSoft" x="-10%" y="-10%" width="120%" height="120%"><feGaussianBlur stdDeviation="2.6"/></filter>
<filter id="mEdge" x="-10%" y="-10%" width="120%" height="120%"><feGaussianBlur stdDeviation="1.1"/></filter>
<clipPath id="mDisc"><circle cx="100" cy="100" r="88"/></clipPath>
<mask id="mLit" maskUnits="userSpaceOnUse" x="0" y="0" width="200" height="200">
<path data-lit fill="#fff" filter="url(#mEdge)" d=""/>
</mask>
<g id="mFace">
<circle cx="100" cy="100" r="88" fill="url(#mBase)"/>
<g filter="url(#mSoft)" fill="#7d8590">
<ellipse cx="74" cy="70" rx="24" ry="18" opacity=".42"/>
<ellipse cx="108" cy="62" rx="16" ry="13" opacity=".36"/>
<ellipse cx="124" cy="88" rx="20" ry="15" opacity=".34"/>
<ellipse cx="86" cy="104" rx="19" ry="12" opacity=".3"/>
<ellipse cx="60" cy="118" rx="13" ry="20" opacity=".28"/>
<ellipse cx="140" cy="118" rx="10" ry="8" opacity=".26"/>
</g>
<g fill="none" stroke="#f6f8fb" stroke-width="1" opacity=".5">
<circle cx="112" cy="150" r="5"/>
<circle cx="138" cy="60" r="3"/>
<circle cx="70" cy="146" r="3.4"/>
</g>
<g fill="#6f7782" opacity=".35">
<circle cx="113" cy="151" r="3.4"/>
<circle cx="138.6" cy="60.6" r="2"/>
<circle cx="70.5" cy="146.6" r="2.3"/>
</g>
<circle cx="100" cy="100" r="88" fill="url(#mLimb)"/>
</g>
</defs>
<g clip-path="url(#mDisc)">
<g data-face-wrap>
<use href="#mFace" class="moon__shade"/>
<use href="#mFace" mask="url(#mLit)"/>
</g>
</g>
<circle class="moon__ring" cx="100" cy="100" r="88"/>
</svg>
</div>
<div class="read">
<p class="read__name"><span class="roll" data-roll="name"><span class="roll__line">Waxing Gibbous</span></span></p>
<p class="read__light"><span class="read__pct" data-pct>0</span><span class="read__unit">%</span> <span class="read__lab">illuminated</span></p>
</div>
<dl class="times">
<div class="times__item">
<dt><svg viewBox="0 0 16 16" aria-hidden="true"><path d="M2 12.5h12M8 10V3.6M5.4 6.2 8 3.6l2.6 2.6"/></svg>Moonrise</dt>
<dd><span class="roll" data-roll="rise"><span class="roll__line">14:02</span></span></dd>
</div>
<div class="times__item">
<dt><svg viewBox="0 0 16 16" aria-hidden="true"><path d="M2 12.5h12M8 3.6V10M5.4 7.4 8 10l2.6-2.6"/></svg>Moonset</dt>
<dd><span class="roll" data-roll="set"><span class="roll__line">03:11</span></span></dd>
</div>
</dl>
<div class="week" data-week role="slider" tabindex="0" aria-label="Day" aria-valuemin="0" aria-valuemax="6" aria-valuenow="0">
<span class="week__pick" data-pick aria-hidden="true"></span>
</div>
</section>
<p class="sr" aria-live="polite" data-live></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>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.
24 values to change
Works with Claude, Claude Code, ChatGPT, Cursor, VS Code, Windsurf, Codex, Gemini CLI
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 “Moon phase card” from Animorio and fit it into my siteEach day’s phase comes from the new moon of 6 January 2000 and the 29.53-day synodic month: 0 is new moon, 0.5 full moon. The lit fraction is (1 − cos 2πp) / 2.
The lit part is a path: the limb semicircle on the light side plus an elliptical arc |cos 2πp| times the radius wide, bending one way or the other for a crescent or a gibbous moon. The path is a slightly blurred mask, so the shadow edge is soft.
A circle with a radial gradient, six blurred grey ellipses for the seas, three craters with a light rim and a dark veil at the limb. The same face sits underneath at 7.5%, like earthshine.
On a new day GSAP takes the phase to the new value with back.out and redraws the path every frame; the face turns two degrees and comes back on an elastic spring, the percentage counts, the halo changes scale and opacity.
Seven buttons with their tiny discs drawn by the same function; the pill slides onto the chosen day with back.out and squashes slightly while dragging. Date, name and times change with two rolling lines.
| Name | File | Default | What it changes |
|---|---|---|---|
START | script.js | "2026-11-25" | The first day of the strip (yyyy-mm-dd). |
DAYS | script.js | 7 | How many days the strip shows. |
SPRING | script.js | 0.9 | Seconds the disc takes to reach the new phase. |
OVERSHOOT | script.js | 1.3 | How much the phase overshoots and settles (0 = none). |
HALO | script.js | 1 | How strong the halo grows towards the full moon (0 = no halo). |
AUTO_STEP | script.js | 1.5 | Seconds between days when nobody touches the card. |
IDLE | script.js | 3 | Seconds of no touch before the card scrolls the days by itself. |
On the weather page of an app or a site: for the evening, for people who photograph, fish, sail or hike, for a garden’s lunar calendar, for a wellbeing or horoscope app, for a hotel or a campsite offering nights under the moon.
Everything is in em and the size depends on both the width and the height of the window, so the whole card fits the phone box. On the strip you drag with a finger; the moon doesn’t follow the pointer where there is no hover.
No springs or rolling: the disc changes phase at once with a short fade, the lines change with a fade, the pill jumps to the chosen day.
GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 7.1 KB; the libraries: GSAP 28 KB.
Tested on 25 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.
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.