
Logo loader
Transitions, SVG, Text
A phone’s document scanner: in the viewfinder a sheet photographed askew on a dark desk. Tap the shutter and the yellow outline leaves the frame and snaps onto the sheet’s four corners, a line of light reads it from top to bottom and the ink turns crisp as it passes; then the sheet straightens, turns clean white and shrinks towards the pile, which counts one more page.
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 scanner" 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 scanner</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">
<!-- a document scanner: the sheet is photographed askew, the outline finds its four corners,
a line reads it, then the sheet straightens, turns clean white and goes onto the pile -->
<section class="ds" data-ds data-state="idle" aria-label="Document scanner">
<div class="ds__view">
<svg viewBox="0 0 300 220" preserveAspectRatio="xMidYMid slice" aria-hidden="true">
<g data-sheet>
<polygon class="ds__shadow" data-shadow points=""></polygon>
<polygon class="ds__paper" data-paper points=""></polygon>
<g class="ds__ink" data-ink></g>
</g>
<polygon class="ds__outline" data-outline points=""></polygon>
<g class="ds__corners" data-corners><circle r="4.500"></circle><circle r="4.500"></circle><circle r="4.500"></circle><circle r="4.500"></circle></g>
<line class="ds__beam" data-beam x1="0" y1="0" x2="0" y2="0"></line>
</svg>
<span class="ds__hint"><span data-outhint>Point at a document</span></span>
</div>
<div class="ds__row">
<span class="ds__tray"><i data-tray></i><span class="ds__count"><span data-outcount>2 pages</span></span></span>
<button class="ds__shutter" type="button" data-btn aria-label="Scan the document"><i></i></button>
<span class="ds__mode">Auto</span>
</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>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.
12 values to change
Works with Claude, Claude Code, ChatGPT, Cursor, VS Code, Windsurf, Codex, Gemini CLI
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 scanner” from Animorio and fit it into my siteThe sheet is an SVG polygon described by eight numbers, the coordinates of its corners. Every line of text is written in the sheet’s own coordinates, from 0 to 1, and laid down by blending the four corners: move the corners and all the content follows the perspective.
The outline has its own eight numbers, starting from the viewfinder’s frame and reaching the sheet’s on a spring, one corner after the other. The line of light is the segment between the sheet’s left and right edges at a height going from 0 to 1.
GSAP takes the sheet’s eight numbers to those of an upright rectangle in the middle, while another number lightens the paper from the photo’s warm grey to white. Then the same numbers go to a tiny rectangle in the corner, and the count goes up.
| Name | File | Default | What it changes |
|---|---|---|---|
ACCENT | script.js | #ffcf33 | The colour of the outline that finds the sheet and of the line that reads it. |
SWEEP | script.js | 1.1 | How many seconds the line takes to read the sheet from top to bottom. |
FLAT | script.js | 0.7 | How long the sheet takes to straighten. |
On the page of an app that scans receipts, contracts or notes; at a bank or an insurer, where a document has to be photographed; in the guide to a new feature. The same four-corner sheet serves to straighten a whiteboard, a business card, a receipt.
The piece is at most 312 pixels wide; the viewfinder is 228 tall and gets lower on low screens, the drawing filling it by cropping the sides. The shutter is a 58 pixel circle.
No snapping outline and no running line: on tap the sheet is at once straight, white and readable, the pile counts one more page and after a moment the new sheet fades in. The demo’s pointer does not start.
GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 6.2 KB; the libraries: GSAP 28 KB.
Tested on 26 November 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.
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.