
The inchworm menu
Menus, Hover, Transitions
Someone searched for “neumorphism” and the library had nothing in that style. The power button of the living room light in a made-up smart home panel, in neumorphic style (soft UI): made of the same light grey paper as the background, raised by two soft shadows, a light one top left and a dark one bottom right. On hover it lifts and the shadows stretch; pressed, the shadows move inside and it becomes a hollow, the power icon lights up amber, a thin ring of light runs round the rim of the well and the label rolls from Off to On while the brightness climbs to 80%. Beside it its two smaller siblings, Dim and Timer, in the same style: Dim presses and comes back up dimming the light to 40%, Timer stays down and adds “30 min”. Pressed again, the button rises back into relief on a spring.
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>
<!--
"Neumorphic 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>Neumorphic button</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 power button of a made-up smart home panel, soft UI style: made of the same paper as the background,
raised with two soft shadows; pressed, the shadows move inside, the icon lights up and a ring of light
fills the rim of the well; Dim and Timer are its two smaller siblings -->
<div class="panel" data-panel>
<button class="neu pill" type="button" data-power aria-pressed="false" data-autoclic>
<span class="neu__face neu__face--up" aria-hidden="true"></span>
<span class="neu__face neu__face--down" data-down aria-hidden="true"></span>
<span class="pill__glow" data-glow aria-hidden="true"></span>
<span class="pill__in" data-in>
<span class="well" aria-hidden="true">
<span class="well__warm" data-warm></span>
<svg class="ring" viewBox="0 0 52 52" aria-hidden="true">
<circle class="ring__track" cx="26" cy="26" r="24"></circle>
<circle class="ring__light" cx="26" cy="26" r="24" pathLength="1" data-ring></circle>
</svg>
<svg class="power" viewBox="0 0 24 24" data-icon aria-hidden="true">
<path class="power__arc" d="M7.05 7.4a7 7 0 1 0 9.9 0"></path>
<path class="power__bar" d="M12 4.2v7.2" data-bar></path>
</svg>
</span>
<span class="pill__text">
<span class="pill__name" data-name>Living room light</span>
<span class="status" data-status aria-hidden="true"><span class="status__line">Off</span></span>
</span>
</span>
</button>
<div class="sibs">
<button class="neu sib" type="button" data-dim aria-label="Dim" title="Dim" aria-disabled="true">
<span class="neu__face neu__face--up" aria-hidden="true"></span>
<span class="neu__face neu__face--down" aria-hidden="true"></span>
<svg class="sib__icon" viewBox="0 0 24 24" aria-hidden="true">
<circle class="dim__core" cx="12" cy="12" r="3.6"></circle>
<path class="dim__half" d="M12 8.4a3.6 3.6 0 0 1 0 7.2z"></path>
<g class="dim__rays" data-rays>
<path d="M12 3.4v1.8M12 18.8v1.8M3.4 12h1.8M18.8 12h1.8M5.9 5.9l1.3 1.3M16.8 16.8l1.3 1.3M5.9 18.1l1.3-1.3M16.8 7.2l1.3-1.3"></path>
</g>
</svg>
</button>
<button class="neu sib" type="button" data-timer aria-label="Timer" title="Timer" aria-pressed="false" aria-disabled="true">
<span class="neu__face neu__face--up" aria-hidden="true"></span>
<span class="neu__face neu__face--down" aria-hidden="true"></span>
<svg class="sib__icon" viewBox="0 0 24 24" aria-hidden="true">
<circle class="clock__rim" cx="12" cy="13" r="7.2"></circle>
<path class="clock__top" d="M10 3.6h4"></path>
<path class="clock__hand" d="M12 13V8.6" data-hand></path>
</svg>
</button>
</div>
</div>
<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.
19 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 “Neumorphic button” from Animorio and fit it into my siteEvery button has a single box-shadow with four shadows: two outside (relief) and two inset (hollow), all computed from two CSS variables, --o and --i, multiplied into pixels with calc. The script keeps --o and --i in a small object and GSAP animates it, writing the variables on every frame.
An outer shadow can’t morph into an inset one: the press is a two-step timeline, first --o drops to zero with power2.in, then --i grows to the depth with a hair extra and settles. Two veils on the face, domed and concave, swap opacity.
On release --i quickly returns to zero and --o climbs back with back.out: the relief goes a pixel past its size and returns, like a real key.
An SVG circle with pathLength 1, rotated −90 degrees so it starts at the top, draws by taking strokeDashoffset from 1 to 0, autoRound off; as it closes its width swells once and returns. With the light off the ring is hidden, or its round cap would stay as a dot.
The status sits in a window one line tall: the new line comes in from below with yPercent and back.out while the old one leaves at the top; the percentage, in tabular-nums digits, counts with a tween on a number.
| Name | File | Default | What it changes |
|---|---|---|---|
LABEL | script.js | Living room light | The name of the light written on the button. |
LEVEL | script.js | 80 | The brightness when it turns on, in percent. |
DIM_LEVEL | script.js | 40 | The brightness lowered by the Dim button. |
TIMER_MIN | script.js | 30 | The minutes of the timer that turns the light off. |
DEPTH | script.js | 7 | How raised the button is: the length of the shadows, in pixels. |
PRESS_DEPTH | script.js | 4 | How deep the hollow is when pressed, in pixels. |
SPRING | script.js | 2.2 | How far the button overshoots as it rises back. |
RING_TIME | script.js | 0.9 | How long the ring of light takes to go round, in seconds. |
LOOP_PAUSE | script.js | 1.8 | The pause with the light off before the loop starts again. |
In a smart home app or dashboard, on the panel of a lamp, an air purifier or a thermostat, on a soft UI site that wants soft tactile buttons, or as the switch for any feature that turns on and off.
Under 440 pixels wide the two siblings go under the pill, which takes at most the width minus a margin: everything fits the phone preview box, shadows included. Touch stands in for hover: as soon as the finger lands the key goes halfway down, then on release it reaches the bottom.
No movement or springs: the light is shown already on at 80% with the ring closed, shadows and colours change with a fade, the status crossfades without rolling, the numbers jump to their value and the self-running loop doesn’t start.
GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 6.6 KB; the libraries: GSAP 28 KB.
Tested on 22 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.