
Ridge line background
Backgrounds, WebGL, Hover
An animated background for the opening of a made-up design festival, Fold: a curtain of plum satin pleated like an accordion, lit by a single warm spot. The light follows the pointer and the pleats catch it on every other face, with a thin glint on the crests; a slow breath of air bends them on its own, the hand brushes them aside like a real curtain and lets them spring back, and the Get tickets button sends a ripple through the whole cloth. A hand-written WebGL shader, under the title, the date and the ticket button.
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>
<!--
"Pleated fabric background" 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 pleated fabric background of the festival with the light that follows the pointer</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>
<!-- the opening of an invented design festival, Fold, over a curtain of pleated satin lit by one warm spot:
the light follows the pointer and the pleats catch it face by face, a slow breath of air runs through them on its
own, the hand brushes them aside as it passes, and the ticket button sends a ripple through the whole cloth -->
<main class="stage" data-stage>
<canvas class="cloth" data-cloth aria-hidden="true"></canvas>
<span class="scrim" aria-hidden="true"></span>
<span class="grain" aria-hidden="true"></span>
<section class="hero" aria-labelledby="hero-title">
<p class="pill" data-in>
<span class="pill__tag">Milan</span>
<span class="pill__text">Fold Design Festival</span>
</p>
<h1 class="title" id="hero-title" data-in>Everything starts<br>with a <em>fold</em></h1>
<p class="date" data-in>
<svg class="date__icon" viewBox="0 0 16 16" aria-hidden="true"><rect x="2.5" y="3.5" width="11" height="10" rx="2"></rect><path d="M2.5 6.8h11M5.5 2v3M10.5 2v3"></path></svg>
<span>14 to 18 April 2027</span>
<span class="date__sep" aria-hidden="true"></span>
<span>Ex Tessiture halls</span>
</p>
<div class="actions" data-in>
<button class="cta" type="button" data-cta>
<span class="cta__rim" aria-hidden="true"></span>
<span class="cta__face">
<span class="cta__row cta__row--idle" data-row="idle">
<span class="cta__label">Get tickets</span>
<svg class="cta__arrow" viewBox="0 0 16 16" aria-hidden="true"><path d="M3 8h9.5M8.5 4 12.5 8l-4 4"></path></svg>
</span>
<span class="cta__row cta__row--busy" data-row="busy" aria-hidden="true">
<svg class="cta__spin" viewBox="0 0 16 16"><circle cx="8" cy="8" r="5.5"></circle></svg>
<span class="cta__label">Holding your seats</span>
</span>
<span class="cta__row cta__row--done" data-row="done" aria-hidden="true">
<svg class="cta__tick" viewBox="0 0 16 16"><path d="M3.6 8.4 6.6 11.2 12.4 4.9"></path></svg>
<span class="cta__label">Two passes saved</span>
</span>
</span>
</button>
<span class="note">Day pass from €28</span>
</div>
</section>
<svg class="ghost" data-ghost viewBox="0 0 20 20" aria-hidden="true"><path d="M4 2.5v13.2l3.5-3.3 2.4 5.3 2.3-1-2.4-5.2 4.8-.2z"></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.
28 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 “Pleated fabric background” from Animorio and fit it into my siteThe WebGL canvas draws a single triangle larger than the screen; the shader works out the whole cloth, pixel by pixel, at three quarters of the screen resolution, because satin is soft and this keeps it light on phones too.
Every pixel has a phase, its horizontal distance divided by the pleat width; the slope is a softened square wave (the sine divided by the root of its square plus a little), so the faces are flat like real pleats while the crests and valleys stay round. The breath of air, the hand and the button’s ripple only shift the phase: the shader reads it one pixel right, left, above and below and works out which way the pleats face and how tight they are.
Each face’s normal takes the light of a low spot close to the cloth, in a pool that fades with distance; a cool light from below on the other side keeps the shaded faces plum, the valleys darken a little, and two highlights, one broad and one thin, make the satin. The spot and the hand follow the pointer on two different springs: the spot heavy and soft, the hand quicker, and its speed is what drags the pleats.
| Name | File | Default | What it changes |
|---|---|---|---|
PLEAT_SIZE | script.js | 1 | How wide the pleats are. |
DEPTH | script.js | 1 | How deep the pleats are (0 smooth satin). |
AIR | script.js | 1 | How much the breath of air moves the pleats on its own (0 still). |
BRUSH | script.js | 1 | How much the passing hand brushes the pleats aside. |
LIGHT_HEIGHT | script.js | 0.5 | How high the spot is: low, sharper faces and a tighter light. |
LIGHT_SIZE | script.js | 1 | How wide the spot’s pool of light is. |
SHEEN | script.js | 1 | How much the satin shines on the crests. |
AUTO_PILOT | script.js | 3 | After how many seconds without a pointer the drawn one moves (0 never). |
--satin | style.css | #1f1724 | The plum of the satin. |
--sheen | style.css | #f5ddb8 | The champagne of the light and the highlighted word. |
--accent | style.css | #ff7d52 | The orange of the city in the pill and of the ripple. |
For the opening of a festival, a design week, an exhibition, a fashion show or a ticketed evening: when you need a dark, elegant background that feels like a real material, moves on its own and answers the pointer without taking the place of the title, the date and the button.
Same animations: the pleats are sized on the short side of the screen, the finger carries the spot and brushes the pleats like the pointer, and title, date and button are sized on the height too and fit inside the box; below 460 pixels of height the price beside the button hides.
With reduced motion the cloth is already pleated and still, with the spot in place and no air or ripple, the words only fade in and the button goes straight to Two passes saved.
GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 9.7 KB; the libraries: GSAP 28 KB.
Tested on 15 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.