
The coloured fog background
Backgrounds, WebGL
A WebGL animated background for a product’s hero, on warm black, in the style of Libraries.dev: a wide silk ribbon folding and swaying slowly behind the headline, with a pale highlight running along its folds. The pointer pushes it a little and the wave runs along the cloth, a click sends a ripple, and the headline takes the silk’s reflection.
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>
<!--
"Silk ribbon 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 background with a silk ribbon swaying behind the headline</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 hero of an invented design system, Organza, on warm near black: behind the words a wide silk ribbon folds
and sways in WebGL, with soft light running along its folds. The pointer pushes it a little and the wave travels
along the ribbon; a click sends a ripple -->
<main class="stage" data-stage>
<canvas class="silk" data-silk aria-hidden="true"></canvas>
<span class="grain" aria-hidden="true"></span>
<span class="hush" aria-hidden="true"></span>
<section class="hero" aria-labelledby="hero-title">
<p class="pill" data-in>
<span class="pill__tag">New</span>
<span class="pill__text">Motion tokens 2.0</span>
<svg class="pill__arrow" viewBox="0 0 16 16" aria-hidden="true"><path d="M6 3.5 10.5 8 6 12.5"></path></svg>
</p>
<h1 class="title" id="hero-title" data-in data-title>Interfaces that<br>move like silk</h1>
<p class="lede" data-in>Organza gives every component a motion that folds, settles and follows the hand.</p>
<div class="actions" data-in>
<button class="cta" type="button" data-cta>
<span class="cta__sheen" aria-hidden="true"></span>
<span class="cta__label">Get early access</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>
</button>
<span class="note">Free while in beta</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.
23 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 “Silk ribbon background” from Animorio and fit it into my siteEverything is in one fragment shader on a triangle that covers the page. For each column of pixels the ribbon has a centre line, a diagonal bent by two slow sines, and a twist angle that grows along the page. The visible width is the true width times the absolute cosine of the twist: where the ribbon goes edge-on it narrows, where it faces forward it widens, and that is how the folds show.
Across its width the cloth curves a little: the normal turns with the twist and with the position on the ribbon. A diffuse light gives the colour between the shadow tone and the silk tone, a narrow highlight (cosine to the twenty-second power) gives the pale stripe that slides with the folds, and the reverse, where the cosine is negative, is a shade darker. Where the ribbon is edge-on the fold catches a pale line.
The pointer enters the shader as a bell along x: the centre line moves away from it, above or below according to a hyperbolic tangent, and the twist turns a little. There are four ripples, each with a point, a start and a strength: a wave packet that spreads at 0.62 units per second and fades in a little over two seconds, added to the line and to the twist.
The headline’s text is filled with a gradient of peach and white, clipped to the letters with background-clip: text. With the same formula as the shader, the script works out the ribbon’s twist behind the centre of the page and moves the gradient’s light with a CSS variable: the reflection in the letters comes and goes with the silk’s.
| Name | File | Default | What it changes |
|---|---|---|---|
SILK | script.js | #e9a27e | The colour of the silk: the shaded folds and the highlights are worked out from it. |
SPEED | script.js | 1 | How fast the ribbon sways (0 stops it). |
TWIST | script.js | 1 | How many folds the ribbon makes along the page. |
WIDTH | script.js | 1 | How wide the ribbon is. |
PUSH | script.js | 1 | How much the pointer pushes the ribbon (0 leaves it alone). |
RIPPLE | script.js | 1 | How strong the ripple of the click and of the moving pointer is (0 turns it off). |
AUTO_PILOT | script.js | 3 | After how many seconds without a pointer the drawn one moves (0 never). |
As the background of the first screen of a product that wants to feel soft and refined on a dark background: a design system, an animation library, a fashion or beauty brand, an app that talks about fluidity. The ribbon sits behind the headline without covering it, and the reflection in the letters ties the words to the cloth.
The same ribbon at adapted sizes: the shader works in units of the height, so on a narrow phone the ribbon crosses the page more steeply and stays wide, and the headline goes on two smaller lines. A sliding finger pushes the silk, and a tap sends the ripple.
The ribbon stays still in one pose, already unrolled: no waves, no push, no ripples and no drawn pointer. The words only fade in and the reflection in the headline stays where it is.
GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 8.2 KB; the libraries: GSAP 28 KB.
Tested on 27 October 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.