
The inchworm menu
Menus, Hover, Transitions
The licence step of the sign up of Northlane, a made-up car rental, alone on white in the premium product style: two dashed zones for the front and the back. A photo dragged in settles on a spring, a band of blue light scans it while four corners close on its edges; if it finds glare it circles it in red, the zone shakes and asks for another photo. When both sides are sharp, Continue wakes up, checks and turns green.
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>
<!--
"Driving licence upload form" 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 driving licence upload with front and back and the scan that catches the glare</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 licence step of a car rental sign up: two drop zones, front and back. A photo dropped in settles on a
spring, a band of light scans it while four corners close on its edges; if the scan finds glare it circles
it in red, the zone shakes and asks for another photo; when both sides are sharp, Continue wakes up -->
<form class="kyc" data-kyc novalidate>
<span class="kyc__sheen" aria-hidden="true"></span>
<div class="kyc__brand">
<svg class="mark" viewBox="0 0 24 24" aria-hidden="true">
<rect x="1" y="1" width="22" height="22" rx="7"></rect>
<path d="M7 17.5 11.2 6.5M12.8 17.5 17 6.5"></path>
</svg>
<span class="kyc__name" data-brand>Northlane</span>
<span class="kyc__chip">Identity check</span>
</div>
<h1 class="kyc__title">Add your driving licence</h1>
<p class="kyc__sub">Both sides, flat and in good light.</p>
<div class="slots">
<div class="col">
<label class="slot" data-slot="front">
<input class="slot__input" type="file" accept="image/*" data-input aria-describedby="msg-front">
<svg class="slot__dash" aria-hidden="true"><rect></rect></svg>
<span class="slot__focus" aria-hidden="true"></span>
<span class="slot__empty" aria-hidden="true">
<svg class="slot__icon" viewBox="0 0 28 20"><rect x="1" y="1" width="26" height="18" rx="3.2"></rect><path d="M5.5 6.5h5.5v7H5.5zM14 7.5h8.5M14 11h6M14 14h7"></path></svg>
<span class="slot__name">Front</span>
<span class="slot__hint">Drop or browse</span>
</span>
<span class="slot__docbox" aria-hidden="true">
<span class="doc" data-doc>
<span class="card card--front" data-card>
<span class="c-band"></span><span class="c-photo"></span>
<span class="c-lines"><i></i><i></i><i></i><i></i></span>
<svg class="c-sign" viewBox="0 0 40 10"><path d="M1 7c3-5 5-5 6-1s3 3 5-1 4-3 5 0 3 2 6-2 5 0 7 1 5-1 8-2"></path></svg>
<span class="c-holo"></span><span class="c-code"></span>
<span class="glare" data-glare></span>
<span class="scan" data-scan></span>
</span>
<svg class="ring" viewBox="0 0 60 40" data-ring><ellipse cx="30" cy="20" rx="27" ry="17" pathLength="1"></ellipse></svg>
<span class="corners" data-corners><i></i><i></i><i></i><i></i></span>
</span>
</span>
</label>
<p class="msg" id="msg-front" data-msg aria-live="polite">
<svg class="msg__icon" viewBox="0 0 16 16" aria-hidden="true"><circle cx="8" cy="8" r="6.4"></circle><path data-icon d=""></path></svg>
<span class="msg__text" data-text>JPG or PNG, up to 10 MB</span>
<button class="msg__act" type="button" data-act>Replace</button>
</p>
</div>
<div class="col">
<label class="slot" data-slot="back">
<input class="slot__input" type="file" accept="image/*" data-input aria-describedby="msg-back">
<svg class="slot__dash" aria-hidden="true"><rect></rect></svg>
<span class="slot__focus" aria-hidden="true"></span>
<span class="slot__empty" aria-hidden="true">
<svg class="slot__icon" viewBox="0 0 28 20"><rect x="1" y="1" width="26" height="18" rx="3.2"></rect><path d="M5 6h18M5 9.5h11M6 13.5v2.5M8.5 13.5v2.5M10 13.5v2.5M12.5 13.5v2.5M15 13.5v2.5M16.5 13.5v2.5M19 13.5v2.5M21.5 13.5v2.5"></path></svg>
<span class="slot__name">Back</span>
<span class="slot__hint">Drop or browse</span>
</span>
<span class="slot__docbox" aria-hidden="true">
<span class="doc" data-doc>
<span class="card card--back" data-card>
<span class="c-grid"><i></i><i></i><i></i><i></i><i></i><i></i></span>
<span class="c-bar"></span>
<span class="glare" data-glare></span>
<span class="scan" data-scan></span>
</span>
<svg class="ring" viewBox="0 0 60 40" data-ring><ellipse cx="30" cy="20" rx="27" ry="17" pathLength="1"></ellipse></svg>
<span class="corners" data-corners><i></i><i></i><i></i><i></i></span>
</span>
</span>
</label>
<p class="msg" id="msg-back" data-msg aria-live="polite">
<svg class="msg__icon" viewBox="0 0 16 16" aria-hidden="true"><circle cx="8" cy="8" r="6.4"></circle><path data-icon d=""></path></svg>
<span class="msg__text" data-text>JPG or PNG, up to 10 MB</span>
<button class="msg__act" type="button" data-act>Replace</button>
</p>
</div>
</div>
<button class="go" type="submit" data-go disabled>
<span class="go__fill" aria-hidden="true"></span>
<svg class="go__spin" viewBox="0 0 20 20" aria-hidden="true"><circle cx="10" cy="10" r="7.5" pathLength="1"></circle></svg>
<svg class="go__tick" viewBox="0 0 20 20" aria-hidden="true"><path d="M5 10.4 8.6 14 15.2 6.6" pathLength="1"></path></svg>
<span class="go__label" data-go-label>Add both sides</span>
</button>
<p class="kyc__foot">
<svg viewBox="0 0 16 16" aria-hidden="true"><rect x="3.2" y="7" width="9.6" height="7" rx="2"></rect><path d="M5.4 7V5.2a2.6 2.6 0 0 1 5.2 0V7"></path></svg>
Encrypted, and deleted after the check
</p>
</form>
<span class="drag" data-drag aria-hidden="true">
<span class="card card--front">
<span class="c-band"></span><span class="c-photo"></span>
<span class="c-lines"><i></i><i></i><i></i><i></i></span>
<svg class="c-sign" viewBox="0 0 40 10"><path d="M1 7c3-5 5-5 6-1s3 3 5-1 4-3 5 0 3 2 6-2 5 0 7 1 5-1 8-2"></path></svg>
<span class="c-holo"></span><span class="c-code"></span>
<span class="glare"></span>
</span>
</span>
<svg class="ghost" data-ghost viewBox="0 0 24 24" aria-hidden="true"><path d="M5 3.2 19.2 11l-6.3 1.6-3.3 5.9Z"></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.
32 values to change
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 “Driving licence upload form” from Animorio and fit it into my siteEach zone is a label with a hidden file input inside: a click or Enter opens the photo picker, and the dragenter, dragover and drop events take a dragged file. Keyboard focus lights a ring with :has(:focus-visible).
The edge is an SVG rect measured on the zone with a ResizeObserver, so the dashes stay fine at any size; while a file hovers the dasharray marches with a small CSS animation of stroke-dashoffset, and turns solid once the photo is in.
Where the dragged photo is let go its rectangle is measured, then the one of its place in the zone: GSAP starts from the difference (offset, scale and a little rotation) and goes back to zero with a back.out, the FLIP. The zone gives by 1.5% and comes back on an elastic.
The corners start 20% wider and close on the card; a band with a gradient and a white line goes down with yPercent. If there is glare an SVG ellipse with pathLength 1 draws around it, the zone takes the is-bad class and shakes with five x steps ending in an elastic.
The state of both zones decides the label, which rolls up and down: Add both sides, Add the back, Add the front, Continue. Pressed, the wheel spins, then the is-done class turns it green and the tick draws itself.
| Name | File | Default | What it changes |
|---|---|---|---|
ACCENT | script.js | "#2f5bff" | The colour of the scan, the corners and the licence band. |
SCAN | script.js | 0.95 | How many seconds the scan light takes to cross the licence. |
SPRING | script.js | 1 | How lively the springs are when the licence settles (0 no bounce). |
SHAKE | script.js | 1 | How much the zone shakes when the photo has glare (0 still). |
BRAND | script.js | "Northlane" | The name of the car rental. |
MAX_MB | script.js | 10 | The largest photo allowed, in megabytes: above it, the zone refuses it. |
LOOP | script.js | true | Left alone, the drawn pointer uploads the licence by itself. |
In the sign up of a car rental, a car sharing service, an online bank or any app that verifies identity; in the online check-in of a hotel or a holiday home; anywhere a visitor has to upload a two sided document and wants to know at once whether the photo is good.
The panel narrows to 24 pixels from the edges, the zones are sized in clamp with vh and so are the gaps, so it fits the phone box; below 470 pixels of height the line under the title and the encryption line disappear. On touch the zone opens the photo picker or the camera.
No flight, no bounces, no shake: the licence fades in, the corners and the ellipse appear already in place, the labels change with fades. The drawn pointer is not shown, the demo still repeats.
GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 10 KB; the libraries: GSAP 28 KB.
Tested on 15 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.
Support Animorio
Animorio stays free thanks to the people who support it. If you like, buy us a coffee: it helps us make the next animations.
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.