
The inchworm menu
Menus, Hover, Transitions
The privacy settings of an invented social app, on white, in the style of product interface pieces: switching Private account on slides the knob on a spring and closes the little lock it carries, while the preview of the profile as others see it blurs tile after tile under a frosted veil with a lock; below, the three follow requests come in. Switching it off brings everything back sharp in reverse.
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>
<!--
"Private account 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 Private account toggle with the preview that blurs</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 privacy settings of a social app: switching Private account on slides the knob on a spring and closes the
little lock it carries, while the preview of the profile, as others see it, blurs tile after tile under a
frosted veil; switching it off brings everything back sharp in reverse; the follow requests come in below -->
<section class="card" data-card aria-labelledby="pa-label">
<header class="top">
<svg class="top__back" viewBox="0 0 20 20" aria-hidden="true"><path d="M12 4.5 6.5 10l5.5 5.5"></path></svg>
<span class="top__title">Privacy</span>
<span class="brand">
<svg class="brand__mark" viewBox="0 0 20 20" aria-hidden="true">
<rect x="1" y="1" width="18" height="18" rx="6"></rect>
<circle cx="7.6" cy="10" r="3.1"></circle>
<circle cx="12.4" cy="10" r="3.1"></circle>
</svg>
<span class="brand__name">Murmur</span>
</span>
</header>
<div class="row" data-row>
<span class="row__ic" aria-hidden="true">
<svg viewBox="0 0 24 24">
<rect x="5" y="10.5" width="14" height="10" rx="3"></rect>
<path class="row__shackle" data-rowshackle d="M8.4 10.5V8a3.6 3.6 0 0 1 7.2 0v2.5"></path>
<path d="M12 14.6v2"></path>
</svg>
</span>
<div class="row__text">
<span class="row__name" id="pa-label">Private account</span>
<span class="row__hint"><span data-hint>Anyone can see your posts</span></span>
</div>
<button class="sw" type="button" role="switch" aria-checked="false" aria-labelledby="pa-label" data-switch>
<span class="sw__glow" data-glow aria-hidden="true"></span>
<span class="sw__knob" data-knob>
<svg class="sw__lock" viewBox="0 0 16 16" aria-hidden="true">
<path class="sw__shackle" data-shackle d="M5.4 7.4V5.6a2.6 2.6 0 0 1 5.2 0v1.8"></path>
<rect class="sw__body" data-lockbody x="3.8" y="7.2" width="8.4" height="6" rx="1.8"></rect>
</svg>
</span>
</button>
</div>
<div class="preview" data-preview aria-label="How others see your profile">
<span class="preview__label">How others see you</span>
<div class="prof">
<span class="avatar" aria-hidden="true"><span class="avatar__in">MO</span></span>
<span class="prof__text">
<span class="prof__name">Mira Okafor</span>
<span class="prof__meta">@mira.okafor · 248 posts</span>
</span>
<span class="follow" data-follow aria-hidden="true"><span data-followtext>Follow</span></span>
</div>
<div class="grid" data-grid>
<div class="tile" data-tile>
<svg viewBox="0 0 100 100" preserveAspectRatio="xMidYMid slice" aria-hidden="true">
<defs>
<linearGradient id="g-sky" x1="0" y1="0" x2="0" y2="1"><stop offset="0" stop-color="#ffd9c2"/><stop offset="1" stop-color="#ffb08a"/></linearGradient>
<linearGradient id="g-hill" x1="0" y1="0" x2="0" y2="1"><stop offset="0" stop-color="#e2765a"/><stop offset="1" stop-color="#b9503f"/></linearGradient>
</defs>
<rect width="100" height="100" fill="url(#g-sky)"/>
<circle cx="62" cy="46" r="16" fill="#fff4e6"/>
<path d="M0 74c16-12 30-14 46-6s30 6 54-8v40H0Z" fill="url(#g-hill)"/>
<path d="M0 86c22-8 40-8 58-2s28 2 42-2v18H0Z" fill="#8f3a30" opacity=".85"/>
</svg>
</div>
<div class="tile" data-tile>
<svg viewBox="0 0 100 100" preserveAspectRatio="xMidYMid slice" aria-hidden="true">
<defs>
<linearGradient id="g-sage" x1="0" y1="0" x2="1" y2="1"><stop offset="0" stop-color="#dfe8dc"/><stop offset="1" stop-color="#b8ccb4"/></linearGradient>
</defs>
<rect width="100" height="100" fill="url(#g-sage)"/>
<path d="M24 100V58a26 26 0 0 1 52 0v42Z" fill="#7f9c7a"/>
<path d="M36 100V64a14 14 0 0 1 28 0v36Z" fill="#eef3ea"/>
<path d="M50 16v18M41 25h18" stroke="#5d7b59" stroke-width="2.4" stroke-linecap="round"/>
</svg>
</div>
<div class="tile" data-tile>
<svg viewBox="0 0 100 100" preserveAspectRatio="xMidYMid slice" aria-hidden="true">
<defs>
<linearGradient id="g-ind" x1="0" y1="0" x2="1" y2="1"><stop offset="0" stop-color="#3b3f8f"/><stop offset="1" stop-color="#1e2156"/></linearGradient>
</defs>
<rect width="100" height="100" fill="url(#g-ind)"/>
<circle cx="38" cy="54" r="22" fill="#6c71e0" opacity=".9"/>
<circle cx="62" cy="46" r="22" fill="#a9adff" opacity=".55"/>
<circle cx="74" cy="24" r="4" fill="#ffd9c2"/>
</svg>
</div>
<div class="veil" data-veil aria-hidden="true">
<span class="veil__badge">
<svg viewBox="0 0 24 24">
<path class="veil__shackle" data-veilshackle d="M8.2 11V8.4a3.8 3.8 0 0 1 7.6 0V11"></path>
<rect x="5.6" y="10.8" width="12.8" height="9.4" rx="2.8"></rect>
<path d="M12 14.4v2.2"></path>
</svg>
</span>
<span class="veil__title">This account is private</span>
<span class="veil__sub">Only followers can see your posts</span>
</div>
</div>
</div>
<div class="req" data-req aria-live="polite">
<div class="req__in">
<span class="req__faces" aria-hidden="true">
<span class="face" data-face style="--f:#ffb08a">JL</span>
<span class="face" data-face style="--f:#9fb79a">AS</span>
<span class="face" data-face style="--f:#8c90f0">TK</span>
</span>
<span class="req__text"><span class="req__count" data-count>3</span> follow requests</span>
<svg class="req__go" viewBox="0 0 20 20" aria-hidden="true"><path d="M8 4.5 13.5 10 8 15.5"></path></svg>
</div>
</div>
</section>
<svg class="ghost" data-ghost viewBox="0 0 24 24" aria-hidden="true"><path d="M5 3.2 19.2 11l-6.3 1.6-3.3 5.9Z"></path></svg>
</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.
33 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 “Private account toggle” from Animorio and fit it into my siteThe knob has no transform in the CSS: GSAP stretches its width for 0.15 seconds as it leaves, then carries it to the end with an elastic.out whose spring is a knob of the Playground. The travel is measured from the switch’s width and recalculated on resize.
The lock is an SVG with a shackle and a body: open, the shackle is lifted two pixels and turned 22 degrees on its right leg (transformOrigin 100% 100%); closing brings it back to zero with a strong back.out, the knob squeezes by a tenth for the snap, and body and shackle take the accent colour.
Every post tile has its own tween of filter blur and saturate with a slight scale, staggered by STAGGER seconds; switching off reverses the order and each tile comes back sharp with a small scale overshoot and an elastic settle.
The frosted veil arrives once the last tile is blurred: the round lock badge grows with a back.out, its shackle closes and the badge rocks by six degrees. The requests row opens with height auto, then the faces pop in with a stagger and the count lands last.
| Name | File | Default | What it changes |
|---|---|---|---|
APP | script.js | Murmur | The social app’s name at the top right. |
REQUESTS | script.js | 3 | How many follow requests come in below when the profile is private. |
BLUR | script.js | 9 | How much the post tiles in the preview blur, in pixels. |
STAGGER | script.js | 0.11 | The delay between one tile blurring and the next, in seconds. |
SPRING | script.js | 0.55 | The knob’s spring: lower bounces more. |
ACCENT | script.js | #5b4cf5 | The colour of the switch when on, the lock and the requests. |
For the settings of a social app, a community, a creative’s or photographer’s profile, a dating app or a members’ club: anywhere a switch changes who can see something and it helps to show the effect right away.
The card takes the width with a margin and the post tiles shrink with the grid; the gaps are sized on the height too with clamp and vmin, and below 460 pixels of height the top line and the preview label hide, so with the requests open everything fits in the box. A tap on the switch or on the row does the same as a click.
No springs, rolls or cascade: the knob goes to its place, the lock closes, the tiles blur all together as a fade, the veil and the requests fade in. The fake pointer does not start.
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 7 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.