Skip to content
animorio
IT
All components

Festival registration form

Forms, Text, TransitionsGSAP, CSS onlyMediumCompressed weight: Demo 13 KBGSAP 28 KBFreeDownload the zip

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.

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>
<!--
  "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 &amp; 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&ndash;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>

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.

40 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 “Festival registration form” 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 a black page a graphite card rises with a very fine grain, a one pixel edge that catches the light and soft layered shadows. On the left the form: Claim your pass, the name, the email, three choices of pass (Day, Full, Patron) with a pill sliding on a spring and the Get my ticket button. On the right the ticket of Halflight, a motion and design festival in Lisbon, in satin foil with a pattern of fine rings like on real tickets, still joined to its counterfoil along a row of holes, with the two round notches at the top and bottom. As the name is written each letter is engraved into the foil: it arrives a little bigger, bright and blurred, presses in and settles, with a thin line of light walking beside it like the tip of an engraver; the email appears below. Changing pass the foil goes from steel to champagne to lilac, the label at the top turns like a small flap, the price turns on drums digit by digit and a light runs over the metal. On sending the button squashes and waits on a turning arc; the ticket pulls against the perforation, the holes give from top to bottom with a thread of light, the ticket comes free, lifts and leans on a spring with a deeper shadow, while the counterfoil stays and sinks a touch. The code assembles letter by letter out of noise, the barcode rises under it, the counterfoil takes the same code and the button becomes Ticket sent to your inbox with a check drawing itself. Then the ticket goes back on its counterfoil with a little click, the name is erased and the round starts again. With a mouse the ticket leans a little toward the pointer and the light follows it; the fields can really be typed in and a wrong field shakes.

How it works

Counterfoil and ticket cut by the same perforation

They 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.

Letters that are engraved

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 foil changes through variables

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 tear

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.

A real spring as the ease

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.

Values to change

NameFileDefaultWhat it changes
NAMEscript.jsNoor OkaforThe name the form writes by itself.
EMAILscript.jsnoor@okafor.studioThe email the form writes by itself.
PRICE_DAYscript.js149The price of the Day pass, in dollars.
PRICE_FULLscript.js389The price of the Full pass, in dollars.
PRICE_PATRONscript.js690The price of the Patron pass, in dollars.
TYPINGscript.js11How many letters per second the form writes by itself.
ENGRAVEscript.js0.5How many seconds a letter takes to settle into the foil.
TEARscript.js0.55How many seconds the perforation takes to give, top to bottom.
LIFTscript.js1How far the ticket moves off the counterfoil once torn.
SPRINGscript.js1How springy every settle is: 0.5 calm, 2 very bouncy.
AUTOscript.jstrueWrites, chooses and sends by itself until someone touches the card.

Try them in the Playground

When to use it

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 phones

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.

With reduced motion

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.

Pitfalls

  • With a single mask of holes the ticket also had square corners and the notches had to be painted over in the card's colour, which showed as soon as the ticket moved: the notches are two more masks intersected with mask-composite, so they are real holes and whatever is behind shows through.
  • The ticket's shadow made with box-shadow was cut by the mask: the shadow is a drop-shadow on the outer piece, which follows the toothed shape, and the deeper shadow of the torn ticket is a separate blurred element whose opacity is all GSAP changes.
  • The colour variables sat on the ticket and the fields and the pill, which are outside it, stayed grey: they sit on the card, which holds everything, and GSAP animates them there.
  • Changing pass twice in a row left the pass label invisible because the second flap started while the first was still reappearing: every change stops the flap before it.
  • A long name ran out of the ticket: after each letter the name's width is measured and the group shrinks with its origin at the bottom left.

Libraries

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.

Testing

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