
Falling tools
Physics, Hover
A two way switch, Heart or Reason, in the services card of a made-up branding studio, Ardent & Axis. Until someone touches it, it calls for attention: every five seconds the knob is kicked toward the other side and comes back bouncing on its stop like a real spring, each bounce half the one before, while a glow in the card's colour breathes around it. Pressed, it squashes; let go, it crosses on a spring that stretches it as it travels. On the change the card turns from warm to rational: the photo wipes in from the side, the title and the three services swap in a cascade, the fee rolls digit by digit and a glass chip on the photo works out the button's WCAG contrast live and picks white or dark words on its own.
Rebuilt from scratch studying loloagency.com by The Agency of Love & Logic, Stas Bondar: the idea is theirs; code, copy and images are ours. Read how it’s made
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>
<!--
"Services toggle 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>Ardent and Axis, services</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fontsource-variable/mona-sans@5.3.0/wdth.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fontsource-variable/newsreader@5.3.0/opsz-italic.css">
<link rel="stylesheet" href="style.css">
</head>
<body>
<main class="stage" data-stage>
<!-- the services card of a made-up brand studio, Ardent and Axis. A two way switch, Heart or Reason, calls for a
touch with a spring nudge until someone uses it, with a glow that breathes around it. Switching changes the
tone of the whole card between warm and rational: the photo, the title, the three services in a cascade, the
fee rolling digit by digit, and a contrast check worked out live while the colours move -->
<article class="card" data-card>
<span class="card__grain" aria-hidden="true"></span>
<header class="top">
<span class="mark">
<svg class="mark__sign" viewBox="0 0 20 20" aria-hidden="true">
<path class="mark__arc" d="M3.5 15.5a6.5 6.5 0 0 1 13 0"/>
<path class="mark__axis" d="M10 3.2v13.6M5.4 16.8h9.2"/>
</svg>
<span>Ardent & Axis</span>
</span>
<button class="toggle" type="button" role="switch" aria-checked="false" aria-label="Show the reason side of the studio" data-toggle>
<span class="toggle__halo" aria-hidden="true" data-halo></span>
<span class="toggle__track" aria-hidden="true" data-track>
<span class="toggle__knob" data-knob><span class="toggle__face" data-face></span></span>
<span class="toggle__label is-on" data-label="0">Heart</span>
<span class="toggle__label" data-label="1">Reason</span>
</span>
</button>
</header>
<figure class="photo" data-photo>
<img class="photo__img is-on" data-img="0" src="argilla.webp" alt="Hands shaping wet terracotta clay on a potter's wheel" width="1024" height="714">
<img class="photo__img" data-img="1" src="cemento.webp" alt="A pale concrete wall cut at an angle against a clear blue sky" width="1024" height="683">
<figcaption class="photo__case">
<span class="swap" data-swap="case"><span class="swap__item is-on">Clayhouse, 2026</span><span class="swap__item">Meridian Hall, 2025</span></span>
</figcaption>
<div class="ratio" data-ratio>
<span class="ratio__head">
<span class="ratio__name">Button contrast</span>
<span class="ratio__value"><span data-ratio-num>5.0</span>:1</span>
<span class="ratio__grade" data-ratio-grade>AA</span>
</span>
<span class="ratio__track" aria-hidden="true"><span class="ratio__fill" data-ratio-fill></span><span class="ratio__pin" data-ratio-pin></span></span>
</div>
</figure>
<div class="title" data-title>
<h2 class="title__set title__set--heart is-on" data-set="0"><span class="mask"><span class="line">Brands people</span></span><span class="mask"><span class="line">fall for, slowly.</span></span></h2>
<h2 class="title__set title__set--reason" data-set="1"><span class="mask"><span class="line">Positioning that</span></span><span class="mask"><span class="line">holds its ground.</span></span></h2>
</div>
<div class="rows" data-rows>
<ul class="rows__set is-on" data-rowset="0">
<li class="row"><svg class="row__tick" viewBox="0 0 14 14" aria-hidden="true"><path d="M2.6 7.4l2.8 2.8 6-6.4"/></svg><span class="row__name">Naming and voice</span><span class="row__time">2 weeks</span></li>
<li class="row"><svg class="row__tick" viewBox="0 0 14 14" aria-hidden="true"><path d="M2.6 7.4l2.8 2.8 6-6.4"/></svg><span class="row__name">Art direction</span><span class="row__time">3 weeks</span></li>
<li class="row"><svg class="row__tick" viewBox="0 0 14 14" aria-hidden="true"><path d="M2.6 7.4l2.8 2.8 6-6.4"/></svg><span class="row__name">Spaces and events</span><span class="row__time">On site</span></li>
</ul>
<ul class="rows__set" data-rowset="1">
<li class="row"><svg class="row__tick" viewBox="0 0 14 14" aria-hidden="true"><path d="M2.6 7.4l2.8 2.8 6-6.4"/></svg><span class="row__name">Brand strategy</span><span class="row__time">2 weeks</span></li>
<li class="row"><svg class="row__tick" viewBox="0 0 14 14" aria-hidden="true"><path d="M2.6 7.4l2.8 2.8 6-6.4"/></svg><span class="row__name">Research and audits</span><span class="row__time">10 days</span></li>
<li class="row"><svg class="row__tick" viewBox="0 0 14 14" aria-hidden="true"><path d="M2.6 7.4l2.8 2.8 6-6.4"/></svg><span class="row__name">Brand architecture</span><span class="row__time">3 weeks</span></li>
</ul>
</div>
<footer class="foot">
<p class="fee">
<span class="fee__label">Engagements from</span>
<span class="fee__value" data-fee aria-hidden="true"></span>
<span class="sr" data-fee-text>24 thousand dollars, 6 weeks</span>
</p>
<a class="cta" href="#" data-cta>
<span class="cta__bg" aria-hidden="true"></span>
<span class="cta__words">Start a project</span>
<svg class="cta__arrow" viewBox="0 0 14 14" aria-hidden="true"><path d="M2.5 7h8.4M7.4 3.3 11.1 7l-3.7 3.7"/></svg>
</a>
</footer>
</article>
<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.
43 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 “Services toggle card” from Animorio and fit it into my siteThe site draws the nudge by hand in CSS keyframes (40 %, 8, 20, 4, 10, 2, 0 in the first fifth of a 5 s cycle). Here it is a real spring: a kick of speed toward the other side, a spring pulling it back to zero with a bounce every 0.3 s, and a stop: when the knob crosses it, place and speed flip and lose half (BOUNCE 0.5), so the peaks come out as 40, 20, 10 on their own. Integrated in 1/240 s steps inside gsap.ticker.
The run from one side to the other (STIFFNESS and DAMPING), the 6 % lean on hover and the press that takes the scale to 0.93: three springs added into one transform. The stretch comes from the speed of the run: the knob widens and flattens by half as much, then turns round again.
A GSAP timeline calls kick() at 3 s, then every 5 s for 24 s, like the site's CSS animation (3 s delay, 5 s long, over after 24 s). At the first real touch (a pointerdown with isTrusted, or a keyboard click) the timeline stops for good and the glow drops to 25 %. The glow is a CSS keyframe from 0 0 40px to 0 0 50px 5px over 3 s, alternate, in the colour of the current tone.
A single number, tone.t, goes from 0 to 1: at every frame paper, ink, grey and accent of the two tones are mixed and written into CSS variables. Then the WCAG relative luminance of the accent is worked out with its ratio against white and against the ink: the higher wins and becomes the colour of the button's words, and its value goes into the chip with its grade (AAA from 7, AA from 4.5, AA Large from 3) and into the pin, at min((r−1)/20, 1), the site's own formula.
As on the site, the old things leave with power2.in in 0.5 s and the new ones arrive with power2.out in 0.7 s, 0.1 s apart: the title lines inside a mask, the service rows with a touch of back.out, the ticks drawn again with stroke-dashoffset. The new photo comes in with a clip-path from the side the knob went to, expo.inOut. The fee digits are reels holding two runs of 0-9, so they always roll forward, 0.03 s between columns, and each reel takes the width of its digit.
| Name | File | Default | What it changes |
|---|---|---|---|
LEFT | script.js | 'Heart' | The word on the left of the switch. |
RIGHT | script.js | 'Reason' | The word on the right. |
NUDGE | script.js | 0.4 | How far each call kicks the knob, as a share of its width (the site uses 40 %). |
BOUNCE | script.js | 0.5 | How much is left after each bounce on the stop: 0.5 halves it, 40, 20, 10. |
CALL_AFTER | script.js | 3 | Seconds before the first call. |
CALL_EVERY | script.js | 5 | Seconds between calls. |
CALL_FOR | script.js | 24 | For how many seconds it calls, then it stays quiet. |
STIFFNESS | script.js | 420 | The spring that carries the knob across: higher is quicker. |
DAMPING | script.js | 30 | Lower lets the knob overshoot more before it lands. |
CASCADE | script.js | 0.1 | Seconds between one row and the next when the contents swap. |
FEE_HEART | script.js | 24 | The fee on the Heart side, in thousands of dollars. |
FEE_REASON | script.js | 18 | The fee on the Reason side. |
LOOP | script.js | true | Left alone, the card plays by itself again and again. |
For the services page of an agency or creative studio, a theme or mode switch in a product, two sides of an offer (feeling and figures, personal and business): when a switch has to get noticed without a line saying ‘click me’, and the change should be felt across the whole card.
The same animation with adapted sizes: the card takes almost the whole width, the photo, title, rows and button get shorter with the screen's height, the contrast chip narrows. You tap with your finger: no hover lean, the press and the spring stay the same.
No kicks and no springs: the knob jumps to its place, the glow stays still, the colours fade in 0.4 s (the contrast is still worked out), photo, title, services and digits change with a fade.
GSAP 3.15.0, Mona Sans (font variabile) 5.3.0, Newsreader (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 12 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.