Skip to content
animorio
IT
Back to the library

Letter paper background

Backgrounds, WebGL, HoverGSAP, WebGL, Canvas, CSS onlyAdvancedCompressed weight: Demo 12 KBGSAP 28 KBFreeDownload the zip

A page background to put behind a headline, for the hero of a made-up invitation studio, Vellier: a sheet of ivory cotton paper with laid lines, chain lines, loose fibres, a monogram watermark and a plate mark around the words. A warm lamp held low, almost level with the sheet, follows the pointer and raises the texture in relief wherever it reaches. On the button the light drops even lower; pressed, the plate prints again and the mark sinks deeper. A hand-written WebGL shader.

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 paper 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 letter paper background with the watermark in raking light</title>
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fontsource-variable/mona-sans@5.3.0/wdth.css">
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fontsource-variable/fraunces@5.3.0/full.css">
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fontsource-variable/fraunces@5.3.0/full-italic.css">
  <link rel="stylesheet" href="style.css">
</head>
<body>
  <!-- the hero of an invented invitation studio, Vellier, over a sheet of ivory cotton paper: laid lines, chain lines,
       loose fibres, a watermark pressed into the pulp and a plate mark around the words; a warm lamp held low beside
       the sheet follows the pointer and raises the texture in relief -->
  <main class="stage" data-stage>
    <canvas class="paper" data-paper aria-hidden="true"></canvas>
    <span class="grain" 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">The Autumn suite, on 600 gsm cotton</span>
      </p>
      <h1 class="title" id="hero-title" data-in>Invitations <em>pressed</em><br>into the paper</h1>
      <p class="lede" data-in>Letterpress cards, envelopes and place names, printed by hand on paper made from cotton rag.</p>
      <div class="actions" data-in>
        <button class="cta" type="button" data-cta>
          <span class="cta__face" data-face>
            <span class="cta__shine" aria-hidden="true"></span>
            <span class="cta__row cta__row--idle" data-row="idle">
              <span class="cta__label">Order free samples</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.6"></circle></svg>
              <span class="cta__label">Pressing your samples</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">Samples on their way</span>
            </span>
          </span>
        </button>
        <span class="note">Posted in three days</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>

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.

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

The first screen of a made-up invitation studio, Vellier, on an ivory sheet: a pill «New · The Autumn suite, on 600 gsm cotton», the big headline in a soft serif «Invitations pressed into the paper» with «pressed» in brick-red italics, a lighter line of text and the button «Order free samples» with «Posted in three days» beside it. The background is real cotton paper, drawn: fine horizontal laid lines, vertical chain lines that wander slightly, thousands of short fibres (a few longer, tinted ones), the clouds of the pulp, a round watermark with the mill's name and an italic V, and the rectangular plate mark around the words. The light comes from a warm lamp held low: wherever it reaches, the texture rises in relief, the side of each fibre facing it lights up and the other casts shade; far from the lamp the paper turns almost smooth again under the cool light of the room. On arrival the lamp comes in from the left and the texture rises with it, then the plate presses and the mark settles on a spring, and the words rise one after another with a one-pixel settle. The lamp follows the pointer on a spring. On the button it stops beside it, drops even lower (more raking) and the relief grows stronger, a blade of light crosses the button and the arrow jumps forward; pressed, it squashes and springs back, the plate prints again and the mark sinks and comes back up, the light flares, and the button turns to «Pressing your samples» with a turning arc and then to «Samples on their way» with the tick drawing itself. If nobody moves the pointer, a drawn one passes over the sheet and presses the button.

How it works

Three textures drawn on load

A 1024-pixel 2D canvas that repeats without a seam holds the fibres: seven thousand short curves in red (the height), the tinted fibres in green; a small 256-pixel tile holds the clouds of the pulp, a noise that repeats with it. A third canvas holds the watermark: two rings, the name written letter by letter along the circle, the italic V and the flourish, in white on black.

The height of the sheet

For each pixel the shader adds up the fibres, the laid lines every LAID pixels (wandering slightly, like the wires of the mould), the chain lines every CHAIN pixels and the clouds; it takes away the watermark, where the pulp is thinner, and the plate mark, a rounded rectangle with a bevel, measured on the headline block.

From height to normal

Three nearby readings of the height give the slope in x and y, and from there the normal of the paper, multiplied by RELIEF. That is what decides how much each point faces the lamp.

The raking light

The lamp sits RAKE times the short side above the sheet, almost level with it. For each pixel what counts is how much more its normal faces the lamp than flat paper does: that extra (or that lack) is what raises the texture. Around it there is a wide, soft pool of warm light; everything else only gets the cool light of the room from above, which barely shows the texture.

The lamp on a spring

The lamp follows the pointer on a hand-written spring; with no pointer it goes back up to the left, as from a window, and sways slowly. On the button it stops beside it and drops even lower, and the relief grows.

The press and the drawn pointer

A press sinks the plate mark and brings it back up with an elastic, makes the lamp flare and moves the button through three states. After AUTO_PILOT seconds without a pointer a looping timeline moves a drawn pointer; the first real movement stops it.

Values to change

NameFileDefaultWhat it changes
RELIEFscript.js1.2How high the relief of the paper is (0 flat).
RAKEscript.js0.13How low the lamp is over the sheet, relative to the short side (lower, more raking).
WARMTHscript.js1How strong the lamp's warm light is.
LAIDscript.js4Spacing of the laid lines, in pixels.
CHAINscript.js30Distance between the vertical chain lines, in pixels.
MARKscript.js0.86Size of the watermark, relative to the short side (0 none).
FOLLOWscript.js0.9How much the light follows the pointer (0 not at all, 1 fully).
AUTO_PILOTscript.js4After how many seconds without a pointer the drawn one starts moving (0 never).

Try them in the Playground

When to use it

For the hero of a stationery shop, a wedding and event invitation studio, a print shop, a paper brand or a handmade product: when you need a light background that feels like a real material and reveals itself little by little under the pointer.

On phones

Same animations: the watermark is sized on the short side and sits behind the headline, the plate mark shrinks to stay inside the edge, the lamp follows the finger; text and button fit inside the box.

With reduced motion

With reduced motion the sheet is already lit and printed, with the lamp still in place, the words only fade in and the button goes straight to «Samples on their way».

Pitfalls

  • With the lamp this low, flat paper right under it faces it fully and a white spot appears: the pool of light has to be done separately, wide and soft, and the relief worked out as the difference from flat paper.
  • The shaded side of the fibres, multiplied by the cool light of the room, turns blue: the negative part of the lamp light has to be taken away without a tint.
  • Computing the pulp noise in the shader, three octaves for four readings, slows phones down a lot: it has to be baked once into a small texture that repeats along with the fibre one; and if frames come slowly the canvas drops in resolution, a step at a time, never below half.
  • Repeating textures in WebGL 1 need power-of-two sides (1024), otherwise REPEAT and mipmaps do not work.
  • The watermark uses the page's serif: it has to be drawn after document.fonts.load, otherwise it comes out in the fallback font.

Libraries

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

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

Testing

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