Skip to content
animorio
IT
All components

Billing address form

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

The delivery step of the checkout of an invented homeware shop, Ostrey, on a white card with a one pixel edge and a three layer shadow, like a Dribbble shot. Under the shipping address there is a tick: «Billing address same as shipping». Untick it and the mark undraws, the box gives a small spring, a hairline draws itself and the billing form unfolds from underneath with a slight bounce; then the lines of the shipping address light up one at a time and fly in an arc into their fields, where they stay tinted green and marked Copied until you change them. Tick it again and the form folds away while the «Billing too» tag pops back onto the card. Left alone, a drawn pointer unticks, types a company name, swaps the street for an office one, hovers the button and ticks again.

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>
<!--
  "Billing address 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 billing address that unfolds from under the shipping one</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>
    <!-- the delivery step of the checkout of Ostrey, an invented homeware shop. A tick says the billing address is the
         same as the shipping one; untick it and the billing form unfolds from under it, and the lines of the shipping
         address fly down into their fields as copies you can keep or change -->
    <section class="co" data-co aria-labelledby="co-title">
      <div class="co__light" aria-hidden="true"></div>
      <header class="co__head">
        <span class="co__brand">
          <svg viewBox="0 0 20 20" aria-hidden="true"><path d="M10 2.5c3.6 2.2 5.5 4.9 5.5 8a5.5 5.5 0 0 1-11 0c0-3.1 1.9-5.8 5.5-8z"/><path d="M10 7.2v10.2"/></svg>
          Ostrey
        </span>
        <nav class="co__steps" aria-label="Checkout steps">
          <span class="co__step is-done">Cart</span>
          <svg viewBox="0 0 8 12" aria-hidden="true"><path d="M2 2l4 4-4 4"/></svg>
          <span class="co__step is-now" aria-current="step">Details</span>
          <svg viewBox="0 0 8 12" aria-hidden="true"><path d="M2 2l4 4-4 4"/></svg>
          <span class="co__step">Payment</span>
        </nav>
      </header>

      <h1 class="co__title" id="co-title">Delivery details</h1>

      <div class="co__ship" data-ship>
        <span class="co__pin" aria-hidden="true">
          <svg viewBox="0 0 20 20"><path d="M10 17.5s5.5-5 5.5-9.2a5.5 5.5 0 0 0-11 0c0 4.2 5.5 9.2 5.5 9.2z"/><circle cx="10" cy="8.3" r="1.9"/></svg>
        </span>
        <span class="co__ship-text">
          <span class="co__ship-name" data-line="name">Mara Lindqvist</span>
          <span class="co__ship-addr"><span data-line="street">14 Harrow Lane</span>, <span data-line="city">Wrenfield</span> <span data-line="post">WF4 2QN</span></span>
        </span>
        <span class="co__same" data-same>
          <svg viewBox="0 0 16 16" aria-hidden="true"><path d="M4 2.8h8v10.4l-1.6-1-1.2 1-1.2-1-1.2 1-1.2-1L4 13.2z"/><path d="M6.2 6h3.6M6.2 8.6h3.6"/></svg>
          Billing too
        </span>
      </div>

      <label class="co__check" data-check>
        <input class="co__input" type="checkbox" checked data-tick-input>
        <span class="co__box" data-box aria-hidden="true">
          <svg viewBox="0 0 16 16"><path class="co__tick" data-tick d="M3.6 8.4l2.9 2.8 5.9-6.3"/></svg>
        </span>
        <span class="co__check-text">Billing address same as shipping</span>
      </label>

      <div class="co__bill" data-bill>
        <div class="co__bill-in" data-bill-in>
          <span class="co__rule" data-rule aria-hidden="true"></span>
          <p class="co__label">Billing address</p>
          <div class="co__grid">
            <label class="f" data-field="name">
              <span class="f__label">Full name</span>
              <input class="f__input" type="text" autocomplete="off" data-input>
              <span class="f__chip" aria-hidden="true">Copied</span>
            </label>
            <label class="f" data-field="company">
              <span class="f__label">Company <em>optional</em></span>
              <input class="f__input" type="text" autocomplete="off" data-input>
              <span class="f__chip" aria-hidden="true">Copied</span>
            </label>
            <label class="f f--wide" data-field="street">
              <span class="f__label">Address</span>
              <input class="f__input" type="text" autocomplete="off" data-input>
              <span class="f__chip" aria-hidden="true">Copied</span>
            </label>
            <label class="f" data-field="city">
              <span class="f__label">Town</span>
              <input class="f__input" type="text" autocomplete="off" data-input>
              <span class="f__chip" aria-hidden="true">Copied</span>
            </label>
            <label class="f" data-field="post">
              <span class="f__label">Postcode</span>
              <input class="f__input" type="text" autocomplete="off" data-input>
              <span class="f__chip" aria-hidden="true">Copied</span>
            </label>
          </div>
        </div>
      </div>

      <button class="co__go" type="button" data-go>
        <span class="co__go-shine" aria-hidden="true"></span>
        <span class="co__go-text">Continue to payment</span>
        <svg viewBox="0 0 16 16" aria-hidden="true"><path d="M3 8h9.5M8.6 4l4 4-4 4"/></svg>
      </button>
    </section>

    <svg class="cursor" data-cursor viewBox="0 0 24 24" aria-hidden="true"><path d="M5 3.2l13.4 9.1-6.1 1.2-3.3 5.4z"/></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>

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.

43 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 “Billing address 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

A tick saying billing is the same as shipping: untick it and it opens the billing form and copies the shipping address into it line by line, showing where each value comes from; copied fields stay marked until you change them.

How it works

A real checkbox

The tick is a real hidden checkbox inside a label: the box and the mark are drawn in SVG and GSAP animates them on change (the mark with stroke-dashoffset, the box with an elastic.out spring).

The height that opens

The form sits inside a zero height container with hidden overflow: on opening GSAP takes the height to the content’s size with back.out and then sets it to auto, so it survives width changes.

The copies in flight

The shipping address lines are spans with data-line: for each a fixed copy is created on the page, the line and the text of its field are measured, and the copy travels in an arc (x and y on different curves) while scaling to the field’s font size.

The copied field

On arrival the copy goes, the value lands in the real field and the field takes the is-copied class (light green fill and the Copied label); the user’s first input removes it.

Closing

Tick it again and the fields fade, the hairline withdraws and the height goes back to zero; the Billing too tag returns to the card with back.out.

The pilot

A drawn pilot plays the story on a GSAP timeline and stops at the first real touch (isTrusted); after ten quiet seconds it starts again.

Values to change

NameFileDefaultWhat it changes
OPENscript.js0.62Seconds the billing form takes to unfold.
OVERSHOOTscript.js0.9How far the form springs past its height before it settles (0 none).
FLYscript.js0.8Seconds a copied line takes to fly into its field.
STAGGERscript.js0.11Seconds between one copied line and the next.
TYPINGscript.js15Letters per second when the pilot types.
HOLDscript.js1.6Seconds the pilot rests between two steps.
SPEEDscript.js12 = the pilot twice as fast, 0.5 = half.
LOOPscript.jstrueThe pilot plays the story again and again.

Try them in the Playground

When to use it

In an online shop’s checkout, at the delivery step: whoever buys for a company or for someone else unticks it and finds billing already filled with what they wrote, to fix only where needed. It also works for a sign-up form with a home and a work address, or for the holder’s details on a subscription.

On phones

The same animation with adapted sizes: the card is 92% of the screen wide, the fields, the title and the spacing are sized on the height too, so the open form fits the phone’s box; the copied lines fly the same way.

With reduced motion

Nothing flies and nothing bounces: the form fades in already open, the values are already in the fields with the Copied label, the tick appears and disappears without drawing and the Billing too tag fades back.

Pitfalls

  • The animated height must go back to auto at the end, otherwise a width change (the phone turned) cuts off the last field.
  • The landing positions of the copies are measured only once the fields have finished coming in: measured earlier, with the fields still 10 px off, the copies land crooked.
  • The pilot types through value and not keyboard events, so the is-copied class is removed in its onUpdate too, not only in the input event.
  • The pilot stops only for real touches (isTrusted): a mouse move is not enough, because whoever records the video moves the mouse.

Libraries

GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.

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

Testing

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