
The inchworm menu
Menus, Hover, Transitions
The terms page of Harbor, a made-up file sharing app, kept short: six sections in an accordion that open on a short spring, each with an «In plain words» summary on top and the smaller legal text below. Beside it a slim index with a marker that slides to the open section (a row of pills on the phone), «Updated» tags on the sections that changed and a «What changed» pill that sweeps a highlighter over the new lines.
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>
<!--
"Terms accordion" 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>Terms accordion</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 terms page of a made-up file sharing app: six sections as an accordion with a plain-words summary on top,
a slim index beside it (pills on the phone) and a «What changed» switch that marks the lines updated last time -->
<article class="terms" data-terms aria-labelledby="titolo">
<header class="terms__head">
<div class="brand" aria-hidden="true">
<svg viewBox="0 0 24 24"><path d="M4 15.5c2.2 0 2.2-1.6 4.4-1.6s2.2 1.6 4.4 1.6 2.2-1.6 4.4-1.6 2.2 1.6 2.8 1.6"/><path d="M12 4v8.2M8.6 7.6 12 4l3.4 3.6"/><path d="M4 19.5c2.2 0 2.2-1.6 4.4-1.6s2.2 1.6 4.4 1.6 2.2-1.6 4.4-1.6 2.2 1.6 2.8 1.6" class="brand__soft"/></svg>
<span>Harbor</span>
</div>
<h1 class="terms__title" id="titolo">Terms of Service</h1>
<div class="terms__meta">
<span class="terms__date">Last updated 3 Nov 2026</span>
<button class="changes" type="button" aria-pressed="false" data-changes>
<span class="changes__face" data-changes-face>
<span class="changes__label">What changed</span>
<span class="changes__count" data-count>3</span>
</span>
</button>
</div>
</header>
<div class="terms__body">
<!-- the index: a column beside the accordion on a wide screen, a row of pills on the phone -->
<nav class="index" aria-label="Sections" data-index>
<span class="index__marker" data-marker aria-hidden="true"></span>
<button class="index__item" type="button" data-go="0">Your account</button>
<button class="index__item" type="button" data-go="1">Payments</button>
<button class="index__item" type="button" data-go="2">Content you share</button>
<button class="index__item" type="button" data-go="3">Cancellation</button>
<button class="index__item" type="button" data-go="4">Privacy</button>
<button class="index__item" type="button" data-go="5">Liability</button>
</nav>
<div class="list" data-list>
<section class="sec" data-sec>
<h2 class="sec__h"><button class="sec__btn" type="button" id="h0" aria-expanded="false" aria-controls="p0" data-head>
<span class="sec__name">Your account</span>
<svg class="sec__chev" viewBox="0 0 16 16" aria-hidden="true" data-chev><path d="M4 6.2 8 10l4-3.8"/></svg>
</button></h2>
<div class="sec__panel" id="p0" role="region" aria-labelledby="h0" data-panel>
<div class="sec__inner">
<p class="plain" data-line><span class="plain__k">In plain words</span>You need to be 16 or older, and keeping your password safe is up to you.</p>
<p class="legal" data-line>You must provide accurate information when creating an account and keep your credentials confidential. You are responsible for all activity that happens under your account.</p>
</div>
</div>
</section>
<section class="sec" data-sec data-updated>
<h2 class="sec__h"><button class="sec__btn" type="button" id="h1" aria-expanded="false" aria-controls="p1" data-head>
<span class="sec__name">Payments</span>
<span class="tag" data-tag>Updated</span>
<svg class="sec__chev" viewBox="0 0 16 16" aria-hidden="true" data-chev><path d="M4 6.2 8 10l4-3.8"/></svg>
</button></h2>
<div class="sec__panel" id="p1" role="region" aria-labelledby="h1" data-panel>
<div class="sec__inner">
<p class="plain" data-line><span class="plain__k">In plain words</span>Plans renew every month. We email you a week before any price change.</p>
<p class="legal" data-line>Fees are billed in advance, monthly or yearly, and are not refundable except where the law requires it. <mark class="mark" data-mark>We will tell you at least seven days before a new price takes effect.</mark></p>
</div>
</div>
</section>
<section class="sec" data-sec data-updated>
<h2 class="sec__h"><button class="sec__btn" type="button" id="h2" aria-expanded="false" aria-controls="p2" data-head>
<span class="sec__name">Content you share</span>
<span class="tag" data-tag>Updated</span>
<svg class="sec__chev" viewBox="0 0 16 16" aria-hidden="true" data-chev><path d="M4 6.2 8 10l4-3.8"/></svg>
</button></h2>
<div class="sec__panel" id="p2" role="region" aria-labelledby="h2" data-panel>
<div class="sec__inner">
<p class="plain" data-line><span class="plain__k">In plain words</span>Your files stay yours. We only use them to run Harbor for you.</p>
<p class="legal" data-line>You keep all rights to what you upload and give Harbor a limited licence to store, copy and show it only to provide the service. <mark class="mark" data-mark>We never use your files to train machine learning models.</mark></p>
</div>
</div>
</section>
<section class="sec" data-sec data-updated>
<h2 class="sec__h"><button class="sec__btn" type="button" id="h3" aria-expanded="false" aria-controls="p3" data-head>
<span class="sec__name">Cancellation</span>
<span class="tag" data-tag>Updated</span>
<svg class="sec__chev" viewBox="0 0 16 16" aria-hidden="true" data-chev><path d="M4 6.2 8 10l4-3.8"/></svg>
</button></h2>
<div class="sec__panel" id="p3" role="region" aria-labelledby="h3" data-panel>
<div class="sec__inner">
<p class="plain" data-line><span class="plain__k">In plain words</span>Cancel anytime in Settings. Your files stay downloadable for 30 days.</p>
<p class="legal" data-line>You may cancel your subscription at any time. <mark class="mark" data-mark>After cancelling, your content stays available for export for 30 days, then it is permanently deleted.</mark></p>
</div>
</div>
</section>
<section class="sec" data-sec>
<h2 class="sec__h"><button class="sec__btn" type="button" id="h4" aria-expanded="false" aria-controls="p4" data-head>
<span class="sec__name">Privacy</span>
<svg class="sec__chev" viewBox="0 0 16 16" aria-hidden="true" data-chev><path d="M4 6.2 8 10l4-3.8"/></svg>
</button></h2>
<div class="sec__panel" id="p4" role="region" aria-labelledby="h4" data-panel>
<div class="sec__inner">
<p class="plain" data-line><span class="plain__k">In plain words</span>We never sell your data. The Privacy Policy has every detail.</p>
<p class="legal" data-line>How we collect and use personal information is described in our Privacy Policy, which is part of these Terms.</p>
</div>
</div>
</section>
<section class="sec" data-sec>
<h2 class="sec__h"><button class="sec__btn" type="button" id="h5" aria-expanded="false" aria-controls="p5" data-head>
<span class="sec__name">Liability</span>
<svg class="sec__chev" viewBox="0 0 16 16" aria-hidden="true" data-chev><path d="M4 6.2 8 10l4-3.8"/></svg>
</button></h2>
<div class="sec__panel" id="p5" role="region" aria-labelledby="h5" data-panel>
<div class="sec__inner">
<p class="plain" data-line><span class="plain__k">In plain words</span>If something goes wrong, we owe you at most what you paid us in the last year.</p>
<p class="legal" data-line>To the fullest extent the law allows, Harbor’s total liability will not exceed the amounts you paid in the twelve months before the claim.</p>
</div>
</div>
</section>
</div>
</div>
</article>
</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.
60 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 “Terms accordion” from Animorio and fit it into my siteThe panel has zero height and hidden overflow: the inner content is measured and the height goes there with a short elastic.out(1, 0.82); at the end it becomes auto, so a window resize never clips it.
The arrow is a small whole svg turning 180 degrees with transformOrigin «50% 50%» and back.out: never svgOrigin on the svg itself, which would move the pivot.
A single element behind the items takes the position and size of the open one (offsetLeft, offsetTop, width and height) and slides there with back.out; on the phone it is the pill background, and the row scrolls to keep it in view.
The changed lines are a mark with a solid gradient as background: GSAP takes background-size from 0% to 100%, so the colour sweeps from the left even across wrapped lines (box-decoration-break: clone).
| Name | File | Default | What it changes |
|---|---|---|---|
OPEN | script.js | 0.62 | Seconds a section takes to open on its spring. |
SPRING | script.js | 0.82 | How firm the opening spring is: lower bounces more. |
CLOSE | script.js | 0.34 | Seconds a section takes to close. |
LINES_STAGGER | script.js | 0.07 | Seconds between the lines coming into an open section. |
CHEVRON_TURN | script.js | 180 | Degrees the arrow turns when its section opens. |
MARKER | script.js | 0.6 | Seconds the index marker takes to slide to the open section. |
MULTI | script.js | false | When true, several sections stay open together. |
PRESS | script.js | 0.985 | How much a header sinks when pressed. |
On the terms, privacy or FAQ page of an app or a subscription service: people find the section they want straight away, read the plain version first and see what changed since last time.
Below 620 pixels the index becomes a row of pills scrolling above the accordion, moving by itself to keep the open pill in view; the card is at most as tall as the screen and the list scrolls inside it.
No springs or rising lines: sections open at once with the text fading in, the arrow turns without motion, the index marker and the highlighter appear without sliding.
GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 7.2 KB; the libraries: GSAP 28 KB.
Tested on 26 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.