Skip to content
animorio
IT
Back to the library

Ink stroke title

Text, WebGL, HoverWebGL, Canvas, GSAPAdvancedCompressed weight: Demo 10 KBGSAP 28 KBFreeDownload the zip

The opening of the page of a made-up atelier that keeps wedding dresses, Atelier Ternelle: on an ivory ground the title «Kept, not stored.» in a high-contrast Bodoni grows letter by letter. Each letter first shows only its thickest strokes, then the ink spreads out to the whole shape with an edge that always stays sharp, 0.7 s a letter and 0.15 s after the one before, in hand-written WebGL with a distance field computed on the spot. The edge is darker and glossy at first, like wet ink, then it dries; near the pointer the letters thin out and breathe, and pressing makes the ink pool.

Rebuilt from scratch studying verostudio.com by Rodéo studio, plutot.cool: 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>
<!--
  "Ink stroke title" 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>Atelier Ternelle: Kept, not stored.</title>
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fontsource-variable/bodoni-moda@5.3.0/opsz.css">
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fontsource-variable/bodoni-moda@5.3.0/opsz-italic.css">
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fontsource-variable/instrument-sans@5.3.0/index.css">
  <link rel="stylesheet" href="style.css">
</head>
<body>
  <main class="stage" data-stage>
    <!-- the opening of the page of a made-up atelier that keeps wedding dresses, Atelier Ternelle.
         The title is drawn in hand-written WebGL from a distance field: each letter appears first as its thickest
         strokes, then the ink spreads out to the whole shape, 0.15 s after the letter before. Near the pointer the
         letters thin out and breathe; pressing makes the ink pool a little -->
    <header class="head">
      <p class="brand">
        <svg class="brand__mark" viewBox="0 0 24 24" aria-hidden="true">
          <path d="M12 6.2a1.9 1.9 0 1 1 1.9 1.9c-1 0-1.9.7-1.9 1.7v.6"/>
          <path d="M12 10.4 3.4 16.6c-.7.5-.4 1.6.5 1.6h16.2c.9 0 1.2-1.1.5-1.6Z"/>
        </svg>
        <span>Atelier Ternelle</span>
      </p>
      <button class="replay" type="button" data-replay aria-label="Replay the title">
        <svg viewBox="0 0 16 16" aria-hidden="true" class="replay__icon"><path d="M3.2 8a4.8 4.8 0 1 0 1.5-3.5"/><path d="M4.4 1.9v2.9h2.9"/></svg>
        <span>Replay</span>
      </button>
    </header>

    <section class="hero">
      <div class="title" data-title>
        <canvas class="title__ink" data-canvas aria-hidden="true"></canvas>
        <h1 class="title__text" data-h1>Kept, <em>not</em> stored.</h1>
      </div>
      <span class="rule" data-rule aria-hidden="true"></span>
      <p class="lede" data-lede>Wedding dresses cleaned by hand, mended and laid in acid-free tissue, kept for as long as you need.</p>
    </section>

    <footer class="foot">
      <span data-foot>Bridal conservation</span>
      <span data-foot>Since 1987</span>
    </footer>
  </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.

23 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 “Ink stroke title” 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

On an ivory ground with slightly darker corners, at the top left the Atelier Ternelle mark with a hanger drawn in a line. In the middle the title «Kept, not stored.» in Bodoni Moda, with «not» in sienna italic. The letters arrive one after the other from the left: of each one only the heaviest stems show at first, like bones, then the ink spreads towards the thin hairlines up to the whole letter, always with a sharp edge; at the end it goes one pixel too far and settles back. While fresh the edge is darker and carries a thread of gloss on the side facing the light, which dries to an even black in a little over a second. Then a thin rule draws itself from the centre, the line below rises word by word, the two small lines at the bottom and the Replay button appear. Under the pointer the nearby letters thin out, the hairlines almost vanish and breathe slowly, and they fill back when the pointer leaves; pressing on the title makes the ink pool and spring back. Replay sends the ink back to its bones and away, then the title writes itself again. Left alone, the pointer passes over the title, presses once and the title writes itself again.

How it works

The title on a canvas, then a distance field

The title is written with fillText on a 2D canvas as large as the real one (up to twice the screen pixels). From the alpha of each pixel the CPU works out the distance to the edge, inside and outside, with Felzenszwalb's Euclidean distance transform in two passes (columns, then rows): a signed distance field, positive inside the letters. The Vero site uses a ready-made MSDF atlas; here it is computed on the spot, so the title changes with the text.

An index for every letter

Measuring the characters with measureText, each pixel of the canvas knows which letter it belongs to (the border between two letters lies halfway across the gap), and for each letter the largest distance is kept, its thickest stroke. Index, thickest stroke and accent go in a second texture read without filtering, the distance in a texture with linear filtering.

The threshold coming down

In the fragment shader each letter has its own time: i = index * 0.15, j = easeOutCubic((time - i) / 0.7), threshold = mix(0.8, 0, j) * thickest stroke. It draws where distance minus threshold is positive, with a smoothstep less than a pixel wide: at first only the thickest strokes pass, at the end the whole letter, and the edge stays sharp at every step. A sine adds one pixel of ink at the end and takes it back.

Wet ink that dries

Near the edge (three pixels) the colour moves towards a deeper black while the letter is fresh, and the gradient of the distance, read with four samples around, gives the direction of the edge: where it faces the light at the top left a thin band gets lighter, like a glossy bead. Both fade out in DRY_TIME.

The pointer that thins

The pointer position, followed with quickTo, raises the threshold with a Gaussian bell three quarters of a line wide, multiplied by a slow sine: the nearby letters lose their hairlines and breathe. Pressing lowers the threshold instead, the ink pools, and on release it comes back on an elastic spring.

Replay and the fallback without WebGL

Replay takes the threshold past the thickest stroke in 0.55 s, so the ink goes back to its bones and disappears, then the same timeline starts again. The real title stays in the h1 for screen readers; without WebGL the h1 shows and each letter comes in from a blur with the same stagger.

Values to change

NameFileDefaultWhat it changes
LETTER_STAGGERscript.js0.15Seconds between one letter and the next (the site uses 0.15).
LETTER_TIMEscript.js0.7Seconds a letter takes to grow from its thickest strokes to its whole shape (the site uses 0.7).
START_THRESHOLDscript.js0.8How much of each letter is hidden at the start: 0.8 shows only the thickest strokes (the site uses 0.8).
BLEEDscript.js0.9Pixels the ink spreads past the edge at the end of each letter before it settles back.
DRY_TIMEscript.js1.6Seconds the wet, glossy edge takes to dry to an even tone.
HOVER_THINscript.js0.16How much the letters near the pointer thin out, as a share of their thickest stroke.
HOVER_RADIUSscript.js0.75Size of the area that thins around the pointer, in heights of a line.
LOOPscript.jstrueLeft alone, the pointer passes over the title and the title writes itself again.

Try them in the Playground

When to use it

For the opening of a page where the title is everything: an atelier, a fashion house, a magazine, a portfolio, a luxury brand or a product launch. When the title should feel truly written, in a high-contrast typeface, and still be real text for Google and screen readers.

On phones

The same animation with adapted sizes: in a narrow box the title breaks into two lines and the size is measured on the height too; the distance field is recomputed at every resize, even halfway through. A tap on the title makes the ink pool like a mouse press.

With reduced motion

The title is already whole and dry, the line, the rule and the button fade in; no thinning under the pointer, no pooling ink, and Replay is only a fade.

Pitfalls

  • The threshold has to be measured on each letter's thickest stroke, not on a fixed number: with one number thin letters like the comma or the full stop would all come late, and the heavy ones at once.
  • The letter index and the distance cannot share a filtered texture: with linear filtering the index turns into 2.5 at the border between two letters and that column starts halfway between them. Here the index lives in a NEAREST texture.
  • An 8-bit distance field has 256 steps: the scale is set by the thickest stroke of the title plus a few pixels outside, so each step stays under a fifth of a pixel.
  • The typeface must be loaded before drawing on the canvas (document.fonts.load for roman and italic): otherwise the field is computed on Georgia and stays that way.
  • The Vero site does not read prefers-reduced-motion in the WebGL logo: here with reduced motion the title is already whole.

Libraries

GSAP 3.15.0, Bodoni Moda (font variabile) 5.3.0, Instrument Sans (font variabile) 5.3.0.

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

Testing

Tested on 10 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