Skip to content
animorio
IT
All components

Tape measure quote button

Buttons, Hover, TransitionsGSAP, CSS onlyMediumCompressed weight: Demo 8.3 KBGSAP 28 KBFreeDownload the zip

The «Get a quote» button of a made-up architecture studio, Orlo Architects, on white: a graphite pill with a drawn tape measure case next to the label. Pressed, the label flies off, the pill widens and a yellow tape with ticks and metres unrolls inside it, pulled by its spinning case; on the right the reading counts on digits that roll like an odometer, the tape goes a touch too far and settles on 12.40 m, and a white marker drops. Then the tape whips back into its case, the pill takes the knock and becomes «Quote on its way» with a drawn tick and the measure on a yellow chip.

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>
<!--
  "Tape measure quote button" 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 Get a quote button with the tape measure that unrolls</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 Get a quote button of a made-up architecture studio, Orlo: pressed, a tape measure unrolls inside the pill,
         the reading counts up on rolling digits, the tape whips back into its case and the pill says the quote is on its way -->
    <div class="wrap" data-wrap>
      <button class="q" type="button" data-btn aria-label="Get a quote from Orlo Architects">
        <span class="q__sheen" data-sheen aria-hidden="true"></span>

        <span class="q__idle" data-idle>
          <span class="q__icon" aria-hidden="true">
            <svg viewBox="0 0 24 24">
              <rect class="case" x="3.2" y="6" width="12.6" height="12.6" rx="3.4"></rect>
              <circle class="hub" cx="9.5" cy="12.3" r="2.3"></circle>
              <path class="tongue" data-tongue d="M15.8 15.6h4.2v3h-1.1"></path>
            </svg>
          </span>
          <span class="q__label" data-label>Get a quote</span>
        </span>

        <span class="tape" data-tape aria-hidden="true">
          <span class="tape__track" data-track>
            <span class="tape__strip" data-strip>
              <svg class="tape__ticks" data-ticks></svg>
              <span class="tape__print">ORLO</span>
            </span>
            <span class="tape__marker" data-marker><i></i></span>
            <span class="tape__roll" data-roll>
              <svg viewBox="0 0 40 40" data-spin>
                <circle class="roll__body" cx="20" cy="20" r="18"></circle>
                <circle class="roll__ring" cx="20" cy="20" r="13"></circle>
                <circle class="roll__ring" cx="20" cy="20" r="9.5"></circle>
                <path class="roll__spoke" d="M20 7v6M20 27v6M7 20h6M27 20h6"></path>
                <circle class="roll__hub" cx="20" cy="20" r="3.4"></circle>
              </svg>
            </span>
            <span class="tape__hook" data-hook></span>
          </span>
          <span class="read" data-read>
            <span class="read__num" data-num></span>
            <span class="read__unit">m</span>
          </span>
        </span>

        <span class="q__done" data-done>
          <svg class="q__check" viewBox="0 0 24 24" aria-hidden="true"><circle class="ck__ring" data-ck-ring cx="12" cy="12" r="9"></circle><path data-ck d="M7.8 12.4 10.9 15.4 16.4 9.2"></path></svg>
          <span class="q__dlabel" data-dlabel>Quote on its way</span>
          <span class="q__meta" data-meta>12.40 m</span>
        </span>
      </button>
      <p class="hint" data-hint aria-live="polite">Orlo Architects <span aria-hidden="true">·</span> reply within 24 h</p>
    </div>

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

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.

24 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 “Tape measure quote button” 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

In the middle of the white sits a 60 pixel graphite pill with fine grain and a top edge that catches light: on the left a drawn tape measure case with a yellow tongue, then «Get a quote»; below, in grey, «Orlo Architects · reply within 24 h». On hover the tongue peeks out a hair and springs back, the label widens on the wdth axis and a light runs across the pill. On click the pill squashes, the label rises and fades, the pill stretches with a bounce; the metal hook, the round case and the reading box appear. The case runs right, spinning, and leaves behind the yellow tape with fine ticks, half ticks and numbered metres that pop up one by one; the reading counts from 00.00 to 12.40 on rolling columns. The tape goes a few pixels too far, comes back and stops with an elastic wobble, a white marker drops and the reading box lights up yellow. Then the tape snaps back in, the pill takes the knock and narrows to «Quote on its way»: the yellow ring draws, then the tick, the label comes in narrow and widens, the yellow chip with 12.40 m pops out and the line below says «Site survey booked». Another click goes back to the start.

How it works

Three states in one pill

Inside the button there are three absolutely positioned layers: rest (icon and label), the tape (tape track and reading box) and done (tick, label, chip). The pill only changes width, measured on the real labels once the font has loaded and again on resize, with back.out for the bounce.

The tape drawn on its real width

The ticks are SVG lines made in JavaScript: the track is measured at the open width, pixels per metre come from the measure (MEASURE) and the finest tick step that stays readable (at least 3.4 pixels) is chosen, with the metre ticks longer and numbered.

One value pulls everything

An object with p from 0 to 1 is tweened by GSAP; on every update the same function cuts the tape with clip-path inset, moves the case, spins it (distance over radius), updates the reading and pops the metre numbers as soon as the tape uncovers them. The overshoot and the settle are two more tweens on the same p: power2.out up to OVERSHOOT pixels beyond, then elastic.out.

Odometer digits

Each digit is a column from 0 to 9 plus a 0 at the end. The last one scrolls continuously with the value; the others stay still and only turn during the last unit of the digit below, like a real odometer. The tens zero stays grey while the measure is under ten metres.

The snap and the pilot

The return is power3.in over RETRACT seconds; on arrival the pill squashes by six points on an elastic.out and the case bounces three pixels. A drawn pointer runs the loop by itself (hovers, presses, waits, presses again); at the first real tap or key it stops and starts again after eight quiet seconds.

Values to change

NameFileDefaultWhat it changes
MEASUREscript.js12.4The metres the tape measures and the reading counts (up to 99.99).
UNROLLscript.js1.7Seconds for the tape to unroll inside the pill.
OVERSHOOTscript.js5Pixels the tape goes past before settling on the measure.
RETRACTscript.js0.38Seconds for the tape to snap back into its case.
HOLDscript.js0.9Seconds the measure holds before the tape returns.
ACCENTscript.js#ecc25aThe colour of the tape, the tongue and the tick ring.
PAUSEscript.js1.3Seconds the autopilot waits between gestures.

Try them in the Playground

When to use it

On the site of an architecture studio, a builder, a renovation company, made-to-measure kitchens, windows or floors: the button to ask for a quote or a site survey, showing the craft while the request goes out. It also works for an estimate form in an app (floor areas, removals, gardens).

On phones

The same animation: the open pill is at most the window width minus 32 pixels, and the tape, the ticks and the pixels per metre are worked out again on that width (on resize too, halfway through). A tap does what the click does; hover only exists where there is a pointer.

With reduced motion

No running tape and no springs: the label fades and «Quote on its way» appears in its place with the tick already drawn and the measure chip; the drawn pointer is hidden.

Pitfalls

  • Ticks measured at the rest width ended up squeezed into a third of the tape: the track has to be measured by giving the pill its open width for a moment, before the animation starts.
  • With every digit scrolling continuously the reading looked like an unreadable blur: only the last digit always scrolls, the others turn only when the one below goes from 9 to 0.
  • Metre numbers visible from the start showed up before the tape: they start transparent and pop only when the tape edge passes them, and turn transparent again when the tape goes back in.

Libraries

GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.

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

Testing

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