
The inchworm menu
Menus, Hover, Transitions
The settings card of a coffee subscription, like a Dribbble shot: dark body, a one pixel edge, layered shadows. The Vacation hold switch has a glass track and a brushed metal knob that widens under the finger and runs on a spring. Turned on, amber fills the glass, the card warms from its corner, the suitcase lifts its handle, the away dates open, the next two deliveries are crossed out one after the other and the next charge rolls to its new date.
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>
<!--
"Vacation hold toggle" 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 Vacation hold toggle with the deliveries that pause</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 settings card of a coffee subscription. The Vacation hold switch has a glass track and a metal knob that
runs on a spring; turning it on the card warms up, the away dates open under the title, the next deliveries
are skipped one after the other and the next charge rolls into the date the boxes start again -->
<div class="wrap" data-wrap>
<section class="card" data-card aria-labelledby="vh-title">
<i class="card__glow" data-glow aria-hidden="true"></i>
<i class="card__edge" data-edge aria-hidden="true"></i>
<header class="head">
<span class="tile" data-tile aria-hidden="true">
<svg class="tile__bag" viewBox="0 0 28 28" data-bag>
<path class="tile__handle" data-handle d="M10.6 8.4V6.6a1.8 1.8 0 0 1 1.8-1.8h3.2a1.8 1.8 0 0 1 1.8 1.8v1.8"/>
<rect x="5" y="8.4" width="18" height="13.6" rx="3"/>
<path d="M9.6 8.4v13.6M18.4 8.4v13.6"/>
<path class="tile__wheel" d="M8.6 24.6h.01M19.4 24.6h.01"/>
</svg>
</span>
<div class="head__copy">
<h2 class="head__title" id="vh-title">Vacation hold</h2>
<p class="head__sub">
<span class="roll" data-sub>
<span class="roll__face" data-sub-off>Pause your deliveries while you’re away</span>
<span class="roll__face" data-sub-on aria-hidden="true">Deliveries paused, nothing is charged</span>
</span>
</p>
</div>
<button class="switch" type="button" role="switch" aria-checked="false" aria-labelledby="vh-title" data-switch>
<span class="switch__track" aria-hidden="true">
<span class="switch__fill" data-fill></span>
<span class="switch__sheen" data-sheen></span>
</span>
<span class="switch__knob" data-knob aria-hidden="true">
<span class="switch__metal" data-metal></span>
</span>
</button>
</header>
<div class="away" data-away aria-hidden="true">
<div class="away__in" data-away-in>
<svg class="away__icon" viewBox="0 0 20 20"><rect x="3" y="4.5" width="14" height="12" rx="2.4"/><path d="M3 8.5h14M7 3v3M13 3v3"/></svg>
<span class="away__label">Away</span>
<span class="away__dates">Nov 10 <svg class="away__arrow" viewBox="0 0 16 10"><path d="M1 5h13M10 1.5L14 5l-4 3.5"/></svg> Dec 6</span>
<span class="away__nights">26 days</span>
</div>
</div>
<div class="list">
<p class="list__label">Upcoming deliveries</p>
<ul class="rows">
<li class="row" data-row>
<span class="row__day"><b>Nov</b><span>12</span></span>
<span class="row__what"><span class="row__name" data-name>House Blend</span><span class="row__meta">2 bags · whole bean</span><i class="row__strike" data-strike></i></span>
<span class="chip" data-chip><span class="chip__face" data-chip-off>Scheduled</span><span class="chip__face chip__face--on" data-chip-on><svg viewBox="0 0 12 12"><path d="M4.2 3v6M7.8 3v6"/></svg>Skipped</span></span>
</li>
<li class="row" data-row>
<span class="row__day"><b>Nov</b><span>26</span></span>
<span class="row__what"><span class="row__name" data-name>Single Origin, Huila</span><span class="row__meta">1 bag · filter grind</span><i class="row__strike" data-strike></i></span>
<span class="chip" data-chip><span class="chip__face" data-chip-off>Scheduled</span><span class="chip__face chip__face--on" data-chip-on><svg viewBox="0 0 12 12"><path d="M4.2 3v6M7.8 3v6"/></svg>Skipped</span></span>
</li>
<li class="row row--back" data-row data-back>
<span class="row__day"><b>Dec</b><span>10</span></span>
<span class="row__what"><span class="row__name">House Blend</span><span class="row__meta">2 bags · whole bean</span></span>
<span class="chip chip--back" data-chip><span class="chip__face" data-chip-off>Scheduled</span><span class="chip__face chip__face--on" data-chip-on><svg viewBox="0 0 12 12"><path d="M2.6 6.2l2.2 2.2 4.6-4.8"/></svg>First back</span></span>
</li>
</ul>
</div>
<footer class="foot">
<span class="foot__label">Next charge</span>
<span class="foot__value roll" data-charge>
<span class="roll__face" data-charge-off><b>$38.00</b> on Nov 12</span>
<span class="roll__face" data-charge-on aria-hidden="true"><b>$38.00</b> on Dec 10</span>
</span>
</footer>
</section>
</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.
48 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 “Vacation hold toggle” from Animorio and fit it into my siteIt is a button with role switch and aria-checked: click, tap, Enter and space change it, and an aria-live region says out loud what happened to the deliveries. Track and knob are two layers: the glass track has an inner shadow and the amber fill that appears in opacity, the knob is an element for GSAP with the metal inside for the CSS, a conic gradient for the brushing and a radial one for the highlight.
On pointerdown the knob goes from 26 to 33 pixels growing toward the middle (on the right it moves left by as much as it grows), like a fingertip pressing. On release two tweens together: x toward the other side on the spring and the width with two keyframes, a little wider halfway, then 26 again. The measures come from the real track and are taken again on resize.
Every settle uses the same function: a damped oscillator, 1 minus e to the minus d times t times the cosine of 2.5 pi times t. At t equal to 1 the cosine is zero, so the knob lands exactly in place at the end of the tween after passing it by a hair just once; SPRING changes the damping.
The edge is a layer with a one pixel padding and a mask that leaves only the frame; inside, an amber radial gradient in the top right corner has its opacity tied to the CSS variable --warm, which GSAP moves from 0 to 1. Behind the content a large radial glow comes in from the same corner and grows a little; WARMTH sets how much.
Every label and line that changes has two faces in the same grid cell: the old one rises and fades with a breath of blur, the new one comes from below on the spring. The rows start STAGGER seconds apart; the line crossing the name is as wide as the measured name and grows with scaleX from the left, and on the way back it withdraws to the right.
| Name | File | Default | What it changes |
|---|---|---|---|
TRAVEL | script.js | 0.55 | How many seconds the knob takes to cross the track. |
SPRING | script.js | 1 | How springy the knob and every settle are: 0.5 calm, 2 very bouncy. |
STAGGER | script.js | 0.14 | How many seconds pass between one delivery and the next as they pause. |
WARMTH | script.js | 1 | How much warm light pours into the card when the hold is on, 0 to 1.5. |
HOLD | script.js | 3.6 | How many seconds the hold stays on during the automatic round. |
AUTO | script.js | true | Turns the hold on and off by itself until someone touches the card. |
In the settings of a subscription: coffee, food, flowers, wine, home goods, a monthly box. It fits anywhere a switch has a consequence worth showing at once: pausing deliveries, suspending a plan, taking a venue off duty. Seeing the skipped deliveries and the next charge date removes the doubt before it comes.
On the phone the card takes almost all the width and the paddings tighten with the screen height; long delivery names are shortened with an ellipsis and under 380 pixels the day count leaves the strip of dates. A tap turns it on, and the knob widens under the finger as with the mouse. The rest is the same.
Nothing moves: the knob is already on the other side, the amber, the warm light and the edge fade in, the strip of dates appears open, the labels and the charge change with a fade and the line over the skipped deliveries appears without running.
GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 8.1 KB; the libraries: GSAP 28 KB.
Tested on 6 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.
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.