Skip to content
animorio
IT
All components

Document watermark

Pickers, HoverGSAP, CSS onlyMediumCompressed weight: Demo 5.4 KBGSAP 28 KBFreeDownload the zip

The watermark settings of a document about to be exported, in a card on white: the page preview with “DRAFT” on it, a grid of nine cells to choose where it goes and three texts to pick from. Tapping a cell flies the watermark to that corner on a spring, small and straight; at the centre it is large and tilted again. Changing the text rolls the word and the watermark settles back in its place.

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>
<!--
  "Document watermark" 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>Document watermark</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>
  <main class="stage">
    <!-- the watermark of a document about to be exported: the page preview, the grid of nine positions
         moving the mark on a spring, and the choice of its text -->
    <section class="wm" data-wm aria-label="Watermark">
      <header class="wm__head"><strong>Watermark</strong><span class="wm__where"><span data-outwhere>Centre</span></span></header>
      <div class="wm__view" aria-hidden="true">
        <div class="wm__page" data-page>
          <i class="wm__l wm__l--title"></i><i class="wm__l"></i><i class="wm__l"></i><i class="wm__l wm__l--short"></i>
          <div class="wm__cols"><span class="wm__fig"><i></i><i></i><i></i><i></i></span><span class="wm__txt"><i class="wm__l"></i><i class="wm__l"></i><i class="wm__l"></i><i class="wm__l wm__l--short"></i></span></div>
          <span class="wm__mark" data-mark><span class="wm__clip"><span data-outmark>DRAFT</span></span></span>
        </div>
      </div>
      <div class="wm__set">
        <div class="wm__grid" role="group" aria-label="Position" data-grid></div>
        <div class="wm__words" role="group" aria-label="Text" data-words>
          <i class="wm__pick" data-pick aria-hidden="true"></i>
          <button type="button" class="wm__word" data-word="DRAFT"><span>Draft</span></button>
          <button type="button" class="wm__word" data-word="CONFIDENTIAL"><span>Confidential</span></button>
          <button type="button" class="wm__word" data-word="SAMPLE"><span>Sample</span></button>
        </div>
      </div>
    </section>
    <span class="live" aria-live="polite" data-live></span>

    <svg class="ghost" data-ghost viewBox="0 0 24 24" aria-hidden="true"><path d="M5 3.200 19.200 11l-6.300 1.600-3.300 5.900Z"></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.

16 values to change

Works with Claude, Claude Code, ChatGPT, Cursor, VS Code, Windsurf, Codex, Gemini CLI

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 “Document watermark” 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 white, a rounded card: “Watermark” and on the right “Centre”. Below, on a light grey ground, a white page with the lines of a text and a small chart barely sketched; over it, in translucent red, the word “DRAFT”, large and tilted, at the centre. At the bottom left a grid of nine cells with the middle one dark; on the right three texts one under the other, “Draft”, “Confidential” and “Sample”, the first on a white tile. Tapping the top right cell darkens it with a small bounce, the watermark flies to the page’s corner straightening and shrinking, on a spring that lets it settle, and at the top the text rolls into “Top right”. Picking “Confidential” slides the tile, the word rolls inside the watermark and the mark, now wider, settles back against the margin. Going back to the middle cell raises the watermark again, large and tilted.

How it works

Nine anchors

The cells are nine buttons in a grid, read row by row. For each one the middle of the watermark is computed: against the margin horizontally and vertically, or at the centre of the page.

One element that moves

The watermark is a single element, placed with its middle on the anchor: position, scale and rotation animate together on a spring.

The centre is different

In the middle cell the watermark is large and tilted, like a stamp across the page; at the edges it is small and straight. The scale at the centre never exceeds the page’s width.

The text changes the size

When the word changes the watermark widens or narrows: as soon as the new word is in, the anchor is recomputed and the watermark goes back to it.

Values to change

NameFileDefaultWhat it changes
MARKscript.js#d9432fThe colour of the watermark.
FADEscript.js0.34How visible the watermark is.
TILTscript.js24How many degrees it is tilted when at the centre of the page.
BIGscript.js2.6How many times larger it is at the centre than at the edges.
SPRINGscript.js1How much the watermark bounces when it changes place.
LOOPscript.jstrueLeft alone, the demo’s pointer tries positions and texts and then starts again.

Try them in the Playground

When to use it

In the export dialog of a document editor, a signing app or a PDF tool, and in the settings of anyone delivering photos or designs as proofs; the same grid of nine cells carries the alignment of a logo on an image, the position of a notification on screen or the anchor of a crop.

On phones

The card is at most 348 pixels wide and about 320 tall, and narrows with the screen: the page takes the width it finds and the anchors are recomputed. The grid’s cells are about 27 pixels a side, the three texts 30 tall.

With reduced motion

No flights and no springs: the watermark is in its new position at once, with its size and tilt, and the word changes in one step. The demo’s pointer does not start.

Pitfalls

  • The anchors are computed in pixels from the size of the page and of the watermark: on resize, on font load and on a change of text they have to be recomputed.
  • Position, scale and rotation live on the same element and only GSAP moves them: the centring (minus half the width and height) is inside the same transform, not in CSS.
  • Every cell has its name in aria-label (“Top right”): nine identical buttons would say nothing to a screen reader user. The arrow keys move between the cells.
  • Here the watermark is only a preview: in the exported file it has to be actually drawn on the page, and a translucent word is easily removed. It is not protection.

Libraries

GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.

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

Testing

Tested on 30 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 components