Skip to content
animorio
IT
All components

Course enrolment wizard

Forms, Transitions, HoverGSAP, CSS onlyMediumCompressed weight: Demo 14 KBGSAP 28 KBFreeDownload the zip

The enrollment form of Northlight School, a made-up online school, split into three named steps, Course, Schedule and Details, in a premium white card. Under the card sits the summary slip, Your enrollment: every answer you give leaves the form as a small green pill, arcs down and lands in its line, while the slip grows by one line and the total rolls digit by digit. The email is checked gently: an amber outline and a line that says what is missing, never a red shake; once it is right the tick draws itself. The last press enrolls you: your name flies into the slip, the card says You’re enrolled with a drawn tick, and the slip takes a green edge and the Enrolled label. Left alone, a demo fills the steps by itself and stops at the first touch.

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>
<!--
  "Course enrolment wizard" 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 online course enrollment form wizard with the summary slip that builds up underneath</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" data-stage>
    <!-- one gesture: every answer you give leaves the form and lands in the slip under the card, which grows a line
         at a time while the total rolls; the email is checked gently, and the last press turns the slip into your
         enrollment -->
    <div class="en" data-wrap>
      <form class="card" data-card novalidate aria-label="Enroll at Northlight School">
        <span class="card__edge" aria-hidden="true"></span>
        <header class="card__top">
          <span class="brand">
            <svg class="brand__mark" viewBox="0 0 20 20" aria-hidden="true"><path d="M4 15.5V4.5l12 11V4.5"></path></svg>
            Northlight School
          </span>
          <span class="card__term">Winter term</span>
        </header>

        <div class="steps" role="tablist" aria-label="Enrollment steps">
          <span class="steps__pill" data-pill aria-hidden="true"></span>
          <button class="step" type="button" role="tab" data-step="course" aria-selected="true">
            <span class="step__tick" aria-hidden="true"><svg viewBox="0 0 12 12"><path d="M2.6 6.3 5 8.6l4.4-5"></path></svg></span>
            <span class="step__name">Course</span>
          </button>
          <button class="step" type="button" role="tab" data-step="schedule" aria-selected="false" disabled>
            <span class="step__tick" aria-hidden="true"><svg viewBox="0 0 12 12"><path d="M2.6 6.3 5 8.6l4.4-5"></path></svg></span>
            <span class="step__name">Schedule</span>
          </button>
          <button class="step" type="button" role="tab" data-step="details" aria-selected="false" disabled>
            <span class="step__tick" aria-hidden="true"><svg viewBox="0 0 12 12"><path d="M2.6 6.3 5 8.6l4.4-5"></path></svg></span>
            <span class="step__name">Details</span>
          </button>
        </div>

        <div class="panes" data-panes>
          <section class="pane" data-pane="course" role="radiogroup" aria-label="Choose a course">
            <p class="pane__ask">Choose a course</p>
            <button class="opt" type="button" role="radio" aria-checked="false" data-opt="course" data-value="Product Design Foundations" data-short="Product Design" data-price="240">
              <span class="opt__glyph" aria-hidden="true"><svg viewBox="0 0 20 20"><rect x="3.5" y="3.5" width="13" height="13" rx="3.5"></rect><path d="M3.5 9.5h13M9.5 9.5v7"></path></svg></span>
              <span class="opt__text"><span class="opt__title">Product Design Foundations</span><span class="opt__meta">6 weeks · 18 lessons</span></span>
              <span class="opt__price">$240</span>
            </button>
            <button class="opt" type="button" role="radio" aria-checked="false" data-opt="course" data-value="Motion for Interfaces" data-short="Motion for Interfaces" data-price="180">
              <span class="opt__glyph" aria-hidden="true"><svg viewBox="0 0 20 20"><path d="M3.5 13.5c3-7 6-7 6.5-3.5s3.5 3.5 6.5-3.5"></path><circle cx="16.5" cy="6.5" r="1.3"></circle></svg></span>
              <span class="opt__text"><span class="opt__title">Motion for Interfaces</span><span class="opt__meta">4 weeks · 12 lessons</span></span>
              <span class="opt__price">$180</span>
            </button>
            <button class="opt" type="button" role="radio" aria-checked="false" data-opt="course" data-value="Design Systems in Practice" data-short="Design Systems" data-price="320">
              <span class="opt__glyph" aria-hidden="true"><svg viewBox="0 0 20 20"><rect x="3.5" y="3.5" width="5.5" height="5.5" rx="1.6"></rect><rect x="11" y="3.5" width="5.5" height="5.5" rx="1.6"></rect><rect x="3.5" y="11" width="5.5" height="5.5" rx="1.6"></rect><rect x="11" y="11" width="5.5" height="5.5" rx="2.75"></rect></svg></span>
              <span class="opt__text"><span class="opt__title">Design Systems in Practice</span><span class="opt__meta">8 weeks · 24 lessons</span></span>
              <span class="opt__price">$320</span>
            </button>
          </section>

          <section class="pane" data-pane="schedule" hidden>
            <p class="pane__ask">Pick a cohort</p>
            <div class="chips" role="radiogroup" aria-label="Cohort">
              <button class="chip" type="button" role="radio" aria-checked="false" data-opt="cohort" data-value="Starts Jan 12" data-short="Jan 12">
                <span class="chip__day">Jan 12</span><span class="chip__meta">4 seats left</span>
              </button>
              <button class="chip" type="button" role="radio" aria-checked="false" data-opt="cohort" data-value="Starts Feb 9" data-short="Feb 9">
                <span class="chip__day">Feb 9</span><span class="chip__meta">11 seats left</span>
              </button>
              <button class="chip" type="button" role="radio" aria-checked="false" data-opt="cohort" data-value="Starts Mar 9" data-short="Mar 9">
                <span class="chip__day">Mar 9</span><span class="chip__meta">Opens soon</span>
              </button>
            </div>
            <p class="pane__ask pane__ask--2">Pace</p>
            <div class="seg" role="radiogroup" aria-label="Pace">
              <span class="seg__thumb" data-segthumb aria-hidden="true"></span>
              <button class="seg__opt" type="button" role="radio" aria-checked="false" data-opt="pace" data-value="Self-paced" data-short="Self-paced" data-price="0">Self-paced</button>
              <button class="seg__opt" type="button" role="radio" aria-checked="false" data-opt="pace" data-value="Live sessions" data-short="Live sessions" data-price="60">Live sessions <span class="seg__plus">+$60</span></button>
            </div>
          </section>

          <section class="pane" data-pane="details" hidden>
            <label class="field" data-field="name">
              <span class="field__label">Full name</span>
              <span class="field__box"><input type="text" name="name" autocomplete="name" placeholder="Your name" data-input="name"></span>
            </label>
            <label class="field" data-field="email">
              <span class="field__label">Email</span>
              <span class="field__box">
                <input type="email" name="email" autocomplete="email" placeholder="you@example.com" data-input="email" aria-describedby="email-msg">
                <span class="field__ok" aria-hidden="true"><svg viewBox="0 0 16 16"><path d="M3.6 8.4 6.6 11.2 12.4 4.9"></path></svg></span>
              </span>
              <span class="field__msg" id="email-msg" data-msg aria-live="polite"><span class="field__msgin" data-msgin></span></span>
            </label>
          </section>

          <section class="pane pane--done" data-pane="done" hidden>
            <span class="done__ring" aria-hidden="true">
              <svg viewBox="0 0 44 44"><circle class="done__circle" cx="22" cy="22" r="19"></circle><path class="done__tick" d="M14.5 22.6 19.6 27.4 29.6 16.8"></path></svg>
            </span>
            <p class="done__title">You’re enrolled</p>
            <p class="done__text">Your welcome email is on its way to <span data-doneemail>you</span>.</p>
          </section>
        </div>

        <footer class="card__foot">
          <button class="ghost" type="button" data-back>Back</button>
          <button class="go" type="button" data-go>
            <span class="go__skin" aria-hidden="true"></span>
            <span class="go__shine" data-shine aria-hidden="true"></span>
            <span class="go__labels" data-golabels><span class="go__label" data-golabel>Continue</span></span>
            <svg class="go__arrow" viewBox="0 0 16 16" aria-hidden="true"><path d="M3.5 8h8.5M8.6 4.4 12.2 8l-3.6 3.6"></path></svg>
          </button>
        </footer>
      </form>

      <aside class="slip" data-slip aria-label="Your enrollment">
        <span class="slip__edge" aria-hidden="true"></span>
        <div class="slip__head">
          <span class="slip__title" data-sliptitle>Your enrollment</span>
          <span class="slip__badge" data-badge>Enrolled</span>
        </div>
        <div class="slip__rows" data-rows>
          <p class="slip__empty" data-empty>Your choices will land here</p>
        </div>
        <div class="slip__perf" aria-hidden="true"></div>
        <div class="slip__total">
          <span class="slip__tlabel">Total</span>
          <span class="odo" data-odo aria-live="polite"><span class="odo__cur">$</span></span>
        </div>
      </aside>
    </div>
  </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.

60 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 “Course enrolment wizard” 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 white ground sits the Northlight School card: the mark and Winter term on top, then the names of the three steps on a grey track with a white pill behind the current one. In the first step you choose the course from three rows with an icon, the weeks and the price; the chosen row takes a green edge, a tinted shadow and a coloured icon. Right away the choice lifts off as a green pill, swells a hair, flies in an arc leaning the way it travels and lands on the right of the Course line in the slip under the card: the line opens on a spring, the value rises into place, the slip dips by a pixel as if it took the hit and the total rolls to $240. Continue sends the step out to the left with a blur, the next one comes in with its parts staggered, the card takes the new height and a tick draws itself by the finished step’s name. In the second step you pick the date from three tiles and the pace on a two-way switch, Live sessions adds $60. In the third come the name and the email: if the email is not complete the field takes an amber outline, sways slightly and a line opens below saying what is missing; once it is right the line closes and a tick draws itself in the field. The button, green by now, says Enroll with the price; pressed, a light runs across it while it says Enrolling, the name flies into the slip and the card becomes You’re enrolled, with the circle and the tick drawing themselves, while the slip takes a green edge and the Enrolled label.

How it works

One unit of measure

Every size in the CSS is a multiple of --u, worth min(1px, 100vw/410, 100vh/550): the card and the slip shrink together, in proportion, on both width and height, and fit whole in the phone preview.

The answer that flies

The pill is an absolute element in the wrapper. A tween takes an index from 0 to 1 and on every frame reads again where the landing line is, as it opens: x goes straight, y follows a smoothstep minus a sine for the arc, and the rotation comes from the horizontal speed. Screen measures are divided by the wrapper’s scale, so it also works inside the shrunken demo.

The slip that grows

Each line is born zero high before the flight, in its order (Course, Cohort, Pace, Student), and grows with a back.out to the measured height; changing an answer sends the old value up and brings the new one up from below. The total has three columns of digits from 0 to 9 that slide with yPercent, staggered from the right, and the unused columns close to zero width.

The gentle check

The email is tested with a simple rule and the message says what is missing (the at sign, the end of the address). The field takes an amber outline and a three-pixel push that dies down, the message opens by measuring its height and the card follows; every letter checks again and as soon as it is right the message closes and the tick draws itself with strokeDashoffset.

The demo round

A GSAP timeline clicks the choices, types the name and email letter by letter, gets the email wrong once and fixes it, enrolls, waits and starts again. The first real pointerdown on the stage kills it and the form is left to whoever touched it, in the state it is in.

Values to change

NameFileDefaultWhat it changes
STEP_TIMEscript.js0.55The seconds for one step to leave and the next to come in.
SPRINGscript.js1.3How much things overshoot before they settle.
FLIGHTscript.js0.75The seconds an answer takes to fly into the slip.
ARCscript.js46How high, in pixels, the flight arcs.
ROLLscript.js0.8The seconds the total takes to roll to the new price.
TYPE_SPEEDscript.js15Letters per second the demo types.
HOLDscript.js3.4The seconds the demo stays on the enrolled card.
PAUSEscript.js1.2The seconds of rest before the demo starts again.
SPEEDscript.js1The speed of everything: 2 twice as fast, 0.5 half.
--accentostyle.css#0e7c6bThe school green: choices, flying pill, ticks, final button.
--gentilestyle.css#b4690eThe amber of the gentle email check.
--scontrinostyle.css#f7f6f2The paper of the summary slip.

Try them in the Playground

When to use it

On the site of an online school, a course platform, a bootcamp or a workshop: signing up in a few steps with the summary and the price always in view. It also suits a subscription or a step-by-step booking, by changing the lines of the slip.

On phones

Same animations: everything is measured in --u and the card with its slip shrinks in proportion to fit the screen whole; the finger chooses, types and presses like the mouse.

With reduced motion

No flights, slides or rolling digits: the answers fade into the slip, the steps swap with a fade, the total and the ticks are already in place.

Pitfalls

  • The landing line grows while the pill flies: with the target measured only once the pill landed above the line. The target is read again on every frame, aiming at the middle of the final height.
  • A digit’s width must be measured with a separate inline digit: measured inside the column, which is zero wide, it was zero and the total vanished.
  • The demo typed the rest of the email starting from the empty text read when the timeline was built: the starting text must be read when typing begins.
  • The card’s sheen, on top of the content, washed out the mark: it goes behind with a negative z-index and isolation on the card.

Libraries

GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.

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

Testing

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