Skip to content
animorio
IT
Back to the library

Letter ribbon background

Backgrounds, Hover, WebGLWebGL, Canvas, GSAP, CSS onlyAdvancedCompressed weight: Demo 12 KBGSAP 28 KBFreeDownload the zip

The background of the home of Kova Index, a made-up reference library, taken from a moment of the Creative Reference Library site: behind the stone grey page the giant letters of the brand run upwards on an endless ribbon, and where the pointer passes the ribbon and the type in front break together into sharp rectangular blocks, then slowly settle back. The wheel or a finger speeds the ribbon up; the button follows the pointer and swells when you press it.

Rebuilt from scratch studying crl-2026.webflow.io by Josh Bendall, S•BJ: the idea is theirs; code, copy and images are ours. Read how it’s made

The code

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>
<!--
  "Letter 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>Kova Index, a slow index of references</title>
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fontsource-variable/archivo@5.3.0/wdth.css">
  <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 home of an invented reference library, Kova Index: behind the page the giant letters of the brand run upwards
       on an endless vertical ribbon; where the pointer passes, the ribbon and the type in front break together into
       sharp rectangular blocks (a tiny 5 by 5 displacement grid, sampled without smoothing) and settle back slowly when
       the pointer stops. The wheel, or a drag on a phone, speeds the ribbon up. One hand-written WebGL shader. -->
  <main class="stage" data-stage>
    <canvas class="scene" data-scene aria-hidden="true"></canvas>
    <span class="grain" aria-hidden="true"></span>

    <header class="top">
      <p class="brand" data-gl><span class="brand__name">Kova</span><span class="brand__sub">Reference<br>Index®</span></p>
      <nav class="nav" aria-label="Main" data-gl>
        <span class="nav__item">Index</span>
        <span class="nav__item" data-dim>Shelves</span>
        <span class="nav__item" data-dim>About</span>
      </nav>
    </header>

    <p class="copy copy--one" data-gl><span class="tag">(Index)</span> Kova is a slow index of references: records, films, books and essays that kept earning their place on the desk. Nothing here is new for the sake of it.</p>

    <h1 class="title" data-gl><span>Kova®</span> <span>/Index</span> <span>(2026)</span></h1>

    <p class="copy copy--two" data-gl><span class="tag">(Method)</span> Every entry is picked by hand and read again each season. When it stops being useful, it quietly leaves the index.</p>

    <ul class="shelves" data-gl aria-label="Shelves">
      <li><span class="count">(14)</span> Records</li>
      <li><span class="count">(9)</span> Books</li>
      <li><span class="count">(11)</span> Films</li>
      <li><span class="count">(6)</span> Essays</li>
    </ul>

    <div class="cta-wrap" data-cta-wrap>
      <button class="cta" type="button" data-cta>
        <span class="cta__bg" data-cta-bg></span>
        <span class="cta__label" data-cta-label>Enter the index</span>
        <svg class="cta__arrow" data-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>
    </div>

    <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>

Playground

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.

39 values to change

Or ask your AI assistant for it

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 “Letter ribbon background” from Animorio and fit it into my site
Platform licenseFree on your sites and your clients’ sites. Want it inside a website builder, a template platform or a client dashboard? There’s a license for agencies and platforms.

What it does

A full page home on a warm stone grey, with a soft light at the top left and a light grain. Behind it, the letters K, O, V and A of Kova, black and so big that one fills the screen and touches the sides, rise slowly on an endless vertical ribbon. In front, in white: the brand and the menu at the top, a short paragraph above, the title «Kova® /Index (2026)» in the middle, the second paragraph below, the shelves with their numbers on the left and the lime «Enter the index» button. On opening the page arrives in scattered blocks that settle into place. Moving the pointer, the page breaks into sharp rectangular blocks of a five by five grid: the giant letters and the type in front slide together in the direction of the movement, and every cut lights up with a slightly lighter line and a soft light shadow. When the pointer stops, the blocks go back slowly, pass by a pixel and rest. The wheel, or a finger dragged up and down on a phone, speeds the ribbon up. The button follows the pointer with a little lag, on hover the label widens and the pill swells with a bounce, when pressed it swells more and on release it sends a wave of blocks through the whole page and a push to the ribbon. If nobody moves the pointer, a drawn one passes by.

How it works

The ribbon, drawn once

The four letters are drawn once in a 2D canvas, in Archivo at weight 900 and width 125, each as wide as the ribbon and cropped to its real height, with an empty band of 0.025 between them as on the site. The canvas becomes a texture and the shader reads only its alpha: the ribbon is as wide as the page divided by the 0.9 zoom and repeats vertically with fract(), so no power of two texture is needed. A smoothstep threshold on the alpha keeps the edges sharp even when the letter is magnified several times.

The type in front, redrawn

Every word of the texts marked with data-gl sits in a span: its box is measured and it is redrawn in white in a second canvas as big as the page, with its baseline taken from fontBoundingBoxAscent. The HTML stays in place at zero opacity, for screen readers and for the measures, and is redrawn on resize.

The five by five grid

The displacement is a grid of 25 cells with two numbers each, simulated in JavaScript as on the site: every cell takes the pointer movement times ten, weighted by 1 - smoothstep(0, 0.22, distance), and keeps 0.965 of it every frame. Every number becomes two bytes (16 bits) of a 5 by 5 pixel texture uploaded every frame and read with the NEAREST filter: every cell moves all at once, as a hard block. The shader moves the ribbon and the type by the same amount (uv - grid times 0.03).

The cuts and the settling

On every edge between two cells the shader compares the two shifts: the more they differ, the more a one pixel line and a soft band light up, slightly lighter. When the pointer stays still for more than 0.12 s, the cells switch to a spring with 0.8 damping, which brings them home in about 1.2 s passing by a pixel.

The wheel, the button and the drawn pointer

The wheel speeds the ribbon up as on the site: the speed chases clamp(5e-5 times delta / dt, -2, 2) with 1 - exp(-12 dt), on top of the base speed of 0.02. On a phone, a drag does the same. The button follows the pointer with two 0.6 s quickTo in power3.out, never leaving the page; on release it pushes the cells outwards from the button. After three seconds without a pointer a drawn one passes by with a GSAP timeline, and presses the button too.

Values to change

NameFileDefaultWhat it changes
GRIDscript.js5Cells per side of the grid: with 5, as on the site, the blocks are big; higher, smaller blocks.
RADIUSscript.js0.22How far from the pointer the cells move, in fractions of the page.
STRENGTHscript.js0.03How far a pushed block slides (the site uses 0.03).
DECAYscript.js0.965How much of the push each block keeps every frame while the pointer moves.
SETTLEscript.js1.2Seconds the blocks take to settle back when the pointer stops.
BASE_SPEEDscript.js0.02Speed of the ribbon, in ribbon lengths per second (the site uses 0.02).
WHEELscript.js1How much the wheel or a drag speeds the ribbon up (0 never).
ZOOMscript.js0.9Ribbon zoom: under 1 the letters are wider than the page and leave by the sides.
EDGE_LIGHTscript.js1How light the edge of a moved block is (0 none).
GRAINscript.js0.05How much moving grain on the page.
FOLLOWscript.js0.6Seconds the button takes to catch the pointer.
AUTO_PILOTscript.js3After how many seconds without a pointer the drawn one moves (0 never).

Try them in the Playground

When to use it

For the opening of a site with a strong brand and few words: a library, an archive, a studio, a magazine, a portfolio. The ribbon is a living background behind the title that asks for nothing, and whoever moves the mouse finds that the page breaks into blocks and puts itself back together.

On phones

The same: a passing finger breaks the page like the pointer and a vertical drag speeds the ribbon up. The ribbon is sized on the width, so on a phone more letters show one above the other; the title is sized with min(8.4vw, 12.5vh), the paragraphs go full width, the shelves hide and the button sits at the bottom right without climbing onto the paragraph.

With reduced motion

No blocks, no moving ribbon and no following button: the ribbon is a still drawing and the type is the real HTML, appearing with a fade. The same still drawing stays when the browser has no WebGL.

Pitfalls

  • Non power of two textures, in WebGL 1, do not repeat with REPEAT: the ribbon repeats with fract() in the shader and CLAMP_TO_EDGE, and the empty band between the letters hides the seam.
  • One byte per number made the blocks settle back in one pixel jumps: every grid value uses two bytes, 16 bits.
  • The words of a hidden element (the shelves on a phone) have an empty box and all ended up drawn in the top corner: they are skipped.
  • The brand in Archivo at width 125 was drawn wide in the canvas and narrow in the HTML: the HTML has font-stretch 125% too, otherwise the measures do not match.

Libraries

GSAP 3.15.0, Archivo (font variabile) 5.3.0, Mona Sans (font variabile) 5.3.0.

Compressed with gzip, the three demo files weigh 12 KB; the libraries: GSAP 28 KB.

Testing

Tested on 16 November 2026

  • Desktop: Done
  • Phone: Done
  • Reduced motion: Done
  • Safari on iPhone: To do

License

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.

All animations