
The liquid grid
Hover, Transitions
Two pages of Quire, a made-up writing app: a paper coloured home and an ink blue pricing page. Clicking the Pricing pill, it stretches into a band as wide as the screen, in the colour of the page it leads to, and the band unfolds up and down like an accordion, pleat after pleat, each catching the light or the shadow as it opens, until the ribbon covers everything and becomes the new page. The creases fade and the words rise. Back does the same in paper; left alone it goes and comes back.
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>
<!--
"Accordion ribbon transition" 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>Quire: the ribbon that unfolds like an accordion</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fontsource-variable/instrument-sans@5.3.0/wdth.css">
<link rel="stylesheet" href="style.css">
</head>
<body>
<main class="stage" data-stage>
<!-- two pages of a made-up writing app, Quire. The clicked pill stretches into a ribbon as wide as the screen, in
the colour of the page it leads to, and the ribbon unfolds up and down like an accordion until it covers
everything; then it becomes the new page. The way back does the same in the other colour -->
<div class="grain" aria-hidden="true"></div>
<section class="page page--home is-on" data-page="home" aria-label="Quire, home">
<header class="nav">
<a class="brand" href="#home" aria-label="Quire">
<svg class="brand__mark" viewBox="0 0 24 24" aria-hidden="true">
<path d="M4 5.5h16M4 10.5h16M4 15.5h16M4 20h10"/>
<path class="brand__fold" d="M4 5.5l8 5-8 5 8 4.5"/>
</svg>
<span>Quire</span>
</a>
<nav class="nav__links" aria-label="Sections">
<span>Product</span>
<span>Journal</span>
</nav>
<button class="pill pill--navy" type="button" data-go="pricing">
<span class="pill__bg" aria-hidden="true"><span class="pill__sheen"></span></span>
<span class="pill__label">Pricing</span>
<svg class="pill__arrow" viewBox="0 0 16 16" aria-hidden="true"><path d="M3 8h9M8.5 4.5L12 8l-3.5 3.5"/></svg>
</button>
</header>
<div class="hero">
<p class="eyebrow">The writing app for long projects</p>
<h1 class="title" data-in><span>Write in pages.</span> <span>Plan in folds.</span></h1>
<p class="lede" data-in>Chapters, notes and outlines on one long sheet that folds wherever you need it.</p>
<article class="note" data-in aria-label="A note in Quire">
<div class="note__top">
<span class="note__name">Chapter four, the harbour</span>
<span class="note__count">2,140 words</span>
</div>
<span class="note__line" style="--w: 92%"></span>
<span class="note__line" style="--w: 78%"></span>
<span class="note__line note__line--crease" style="--w: 100%"></span>
<span class="note__line" style="--w: 64%"></span>
</article>
</div>
</section>
<section class="page page--pricing" data-page="pricing" aria-label="Quire, pricing" aria-hidden="true">
<header class="nav">
<button class="pill pill--cream" type="button" data-go="home">
<span class="pill__bg" aria-hidden="true"><span class="pill__sheen"></span></span>
<svg class="pill__arrow pill__arrow--back" viewBox="0 0 16 16" aria-hidden="true"><path d="M13 8H4M7.5 4.5L4 8l3.5 3.5"/></svg>
<span class="pill__label">Back</span>
</button>
<span class="brand brand--small">Quire</span>
</header>
<div class="hero hero--pricing">
<p class="eyebrow" data-in>Pricing</p>
<h1 class="title title--pricing" data-in>One sheet, as long as you need.</h1>
<div class="plans">
<article class="plan" data-in>
<span class="plan__glow" aria-hidden="true"></span>
<span class="plan__name">Personal</span>
<span class="plan__price">$0</span>
<span class="plan__note">Three projects, every fold</span>
</article>
<article class="plan plan--star" data-in>
<span class="plan__glow" aria-hidden="true"></span>
<span class="plan__name">Studio <em>most chosen</em></span>
<span class="plan__price">$8<small>/month</small></span>
<span class="plan__note">Unlimited projects, shared sheets</span>
</article>
</div>
</div>
</section>
<div class="ribbon" data-ribbon aria-hidden="true"></div>
</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.
40 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 “Accordion ribbon transition” from Animorio and fit it into my siteThe ribbon is a stack of absolute strips, one per pleat, each a ninth of the screen tall. The starting band is centred on the pill: the script counts how many pleats it needs above and below to reach the edges. Inside every strip the colour of the arrival page is as big as the screen and moved to its final place, so once the ribbon is flat the page’s gradient is already whole and the change cannot be seen.
The middle strip starts with the pill’s box and radius and goes to full width in 0.6 s on expo.inOut: x and width follow the curve, the height follows it on power2.in so it stays thin until it is nearly wide, and the radius closes last.
Every pleat has an angle going from 90 degrees (closed, zero height) to 0 (flat) on back.out, which goes a little past zero and returns: the strip’s height is the pleat times the cosine of the angle, and the strips stack one under the other (or above, for the top part) adding up the heights. Each pleat starts 0.07 s after the one nearer the pill.
Even and odd pleats face opposite ways: one has a light veil from the top, the other a dark one towards the bottom, and the veil’s opacity is the sine of the angle, so full when closed and zero when flat. The thin line on the pleat’s edge does the same and fades at the end.
While the ribbon opens the old page rises 10 px and dims. Once it is flat the new page, with the same background, is shown and its pieces rise on back.out, 0.07 s apart, while the creases fade; then the ribbon is removed.
| Name | File | Default | What it changes |
|---|---|---|---|
PLEATS | script.js | 9 | Pleats of the ribbon over the height of the screen. |
STRETCH_TIME | script.js | 0.6 | Seconds the pill takes to stretch into a band as wide as the screen. |
PLEAT_TIME | script.js | 0.62 | Seconds each pleat takes to open. |
PLEAT_LAG | script.js | 0.07 | Seconds between one pleat and the next along the ribbon. |
OVERSHOOT | script.js | 1.5 | How far each pleat opens past flat before it settles (0 none). |
SHADE | script.js | 0.9 | How strongly a folded pleat catches the light or the shadow. |
IDLE | script.js | 2.4 | Seconds it waits before the next click when nobody touches it. |
LOOP | script.js | true | Left alone, it goes to pricing and back again and again. |
For moving between two pages of a product site, an app, a landing page or a studio: from the home to pricing, from the menu to a section, from an offer’s button to its details. When every page has its own solid colour and the change should feel like a sheet unfolding from the very thing you pressed.
The same animation with adapted sizes: there are always nine pleats over the height, so shorter on a small screen, and the band starts from the pill wherever it is; titles, note and plans are sized on the height too to fit. The pill’s hover shows only with a mouse; the press and its spring back stay.
No ribbon and no movement: the old page fades out and the new one fades in, its pieces already in place.
GSAP 3.15.0, Instrument Sans (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 8.0 KB; the libraries: GSAP 28 KB.
Tested on 10 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.