
Button menu
Menus, Transitions, Text
The registration form of Halflight, an invented motion and design festival, like a Dribbble shot: a graphite card on black with, next to the fields, the real ticket in satin foil still joined to its counterfoil. The name is engraved into the ticket letter by letter as you type, the kind of pass changes the colour of the foil (steel, champagne, lilac) and the price on drums, and on sending the perforation gives from top to bottom, the ticket comes free on a spring and takes its code with the barcode.
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>
<!--
"Festival registration 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 festival registration form with the ticket that tears off its counterfoil</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/jetbrains-mono@5.3.0/index.css">
<link rel="stylesheet" href="style.css">
</head>
<body>
<main class="stage">
<!-- the registration card of Halflight, a motion and design festival. On one side the form: name, email and the
kind of pass. On the other the real ticket, still joined to its counterfoil: the name is engraved into the foil
letter by letter as it is written, the pass changes the foil and the price, and on sending the ticket tears off
along the perforation and takes its code -->
<div class="wrap" data-wrap>
<article class="card" data-card aria-labelledby="reg-title">
<div class="book" data-book aria-hidden="true">
<div class="book__piece book__piece--stub" data-stub>
<div class="stub">
<span class="stub__brand">Halflight</span>
<span class="stub__code" data-stub-code>Not issued</span>
</div>
</div>
<div class="book__piece book__piece--ticket" data-ticket>
<i class="ticket__lift" data-lift></i>
<div class="ticket" data-face>
<i class="ticket__guilloche"></i>
<i class="ticket__grain"></i>
<i class="ticket__sheen" data-sheen></i>
<div class="ticket__top">
<span class="ticket__brand">
<svg class="ticket__mark" viewBox="0 0 24 24"><path d="M12 2.6a9.4 9.4 0 1 0 0 18.8z"/><circle cx="12" cy="12" r="9.4"/></svg>
<span><b>Halflight</b><em>Motion & Design Festival</em></span>
</span>
<span class="ticket__pass"><span class="ticket__pass-in" data-pass-label>Day pass</span></span>
</div>
<div class="ticket__name">
<span class="ticket__ph" data-ph>Your name</span>
<span class="ticket__letters" data-letters></span>
<i class="ticket__stylus" data-stylus></i>
</div>
<span class="ticket__mail" data-mail></span>
<div class="ticket__foot">
<span class="ticket__cell"><small>Dates</small><span>12–14 Mar</span></span>
<span class="ticket__cell"><small>City</small><span>Lisbon</span></span>
<span class="ticket__cell"><small>Price</small><span class="price" data-price></span></span>
<span class="ticket__issue">
<svg class="bars" data-bars viewBox="0 0 64 16" preserveAspectRatio="none"></svg>
<span class="ticket__code" data-code>Issued on sign up</span>
</span>
</div>
</div>
</div>
<svg class="seam" data-seam viewBox="0 0 4 100" preserveAspectRatio="none"><path data-tear pathLength="1" d="M2 0V100"/></svg>
</div>
<form class="form" data-form novalidate>
<h2 class="form__title" id="reg-title">Claim your pass</h2>
<div class="form__row">
<label class="field" data-field>
<span class="field__label">Full name</span>
<input class="field__input" type="text" autocomplete="name" spellcheck="false" maxlength="22" placeholder="Ada Wren" data-name>
</label>
<label class="field" data-field>
<span class="field__label">Email</span>
<input class="field__input" type="email" autocomplete="email" spellcheck="false" placeholder="you@studio.com" data-email>
</label>
</div>
<div class="passes" role="radiogroup" aria-label="Pass" data-passes>
<i class="passes__pill" data-pill></i>
<label class="passes__opt"><input type="radio" name="pass" value="0" checked><span>Day</span></label>
<label class="passes__opt"><input type="radio" name="pass" value="1"><span>Full</span></label>
<label class="passes__opt"><input type="radio" name="pass" value="2"><span>Patron</span></label>
</div>
<button class="btn" type="submit" data-btn>
<span class="btn__body" data-btn-body>
<span class="btn__shine" data-shine aria-hidden="true"></span>
<span class="btn__face btn__face--rest" data-rest>Get my ticket</span>
<span class="btn__face btn__face--wait" data-wait aria-hidden="true">
<svg class="btn__spin" viewBox="0 0 20 20"><circle cx="10" cy="10" r="7"/></svg>
</span>
<span class="btn__face btn__face--done" data-done aria-hidden="true">
<svg class="btn__check" viewBox="0 0 20 20"><path data-check pathLength="1" d="M4.6 10.4l3.6 3.5 7.2-7.6"/></svg>
<span>Ticket sent to your inbox</span>
</span>
</span>
</button>
</form>
</article>
</div>
<p class="sr" aria-live="polite" data-live></p>
</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.
40 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 “Festival registration form” from Animorio and fit it into my siteThey are two pieces side by side, each with three intersected CSS masks: two big circles at the corners of the shared side (the notches) and a row of half circles repeated with repeat-y along that same side. When the pieces touch the half holes become whole holes and the perforation shows; when they part the toothed edges of the tear remain. Sizes are in cqi units of the container, so holes and notches scale with the ticket.
The name is a real input: on every change the prefix shared with the engraved name is found, extra letters lift off with a blur and new ones are born as spans going from scale 1.32, blur and brightness 2.4 to 1 on a spring. The text has a light shadow below and a dark one above, so it looks cut into the foil; a line of light goes to the end of the name and fades when typing stops. If the name is long the group shrinks to fit the ticket.
The colour of the ticket, the pill, the card's glow and the field outlines comes from five CSS variables on the card (--t1, --t2, --t3, --tink, --tsoft). GSAP animates them straight from one pass to the next, so everything changes together; the price is a row of drums from 0 to 9, each going to its digit with a small delay from the right.
The ticket tugs with keyframes of a pixel or two while an SVG path with pathLength 1 draws along the perforation by animating the stroke-dashoffset attribute; then the ticket moves on the spring to a position measured on the width of the block, a blurred shadow under it lights up and the counterfoil sinks. The barcode is made of rects whose widths come from a generator seeded with the code, and they rise with a staggered scaleY.
Every settle uses the same function, a damped oscillator 1 minus e to the minus d times t times the cosine of 2.5 pi times t: at t equal to 1 the cosine is zero, so it lands exactly in place after passing the mark once. SPRING changes the damping.
| Name | File | Default | What it changes |
|---|---|---|---|
NAME | script.js | Noor Okafor | The name the form writes by itself. |
EMAIL | script.js | noor@okafor.studio | The email the form writes by itself. |
PRICE_DAY | script.js | 149 | The price of the Day pass, in dollars. |
PRICE_FULL | script.js | 389 | The price of the Full pass, in dollars. |
PRICE_PATRON | script.js | 690 | The price of the Patron pass, in dollars. |
TYPING | script.js | 11 | How many letters per second the form writes by itself. |
ENGRAVE | script.js | 0.5 | How many seconds a letter takes to settle into the foil. |
TEAR | script.js | 0.55 | How many seconds the perforation takes to give, top to bottom. |
LIFT | script.js | 1 | How far the ticket moves off the counterfoil once torn. |
SPRING | script.js | 1 | How springy every settle is: 0.5 calm, 2 very bouncy. |
AUTO | script.js | true | Writes, chooses and sends by itself until someone touches the card. |
For signing up to a conference, a festival, a workshop or a concert: on the tickets page or at the end of the event's landing page. The ticket taking shape as you type shows at once what you get, and the tear from the counterfoil is a confirmation people remember.
On the phone the ticket goes on top, as wide as the card, and the form below: name and email side by side, the three choices and the button. Holes, notches and words of the ticket are measured on its width, so everything scales in proportion. The rest is the same; the lean toward the pointer is only there with a mouse.
Nothing moves: letters fade in, the foil and the price change in place, the pill jumps to the new choice. On sending the tear line fades in and the counterfoil dims a little but the ticket stays still; the code and the barcode appear whole and the button turns into the confirmation with a fade.
GSAP 3.15.0, Mona Sans (font variabile) 5.3.0, JetBrains Mono (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 13 KB; the libraries: GSAP 28 KB.
Tested on 6 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.