Skip to content
animorio
IT
Back to the library

Yard savings calculator

Hover, TextGSAPAdvancedCompressed weight: Demo 13 KBGSAP + CustomEase 31 KBFreeDownload the zip

The ROI calculator of a software for logistics yards, Yardline: three sliders on the left, each track coloured up to its thumb, and on the right the dark results panel, with a rounded notch cut into its edge that slides to the slider being moved. The yearly savings rise in dollars with a tween of the value, a lime glow follows them, the percentage rolls its digits and the three savings lines grow their bars. At the bottom ‘Book a demo’ prints itself like a terminal, one letter after the other, the even ones lighting up first as a block.

Rebuilt from scratch studying terminal-industries.com by Rejouice, Propagande: the idea is theirs; code, copy and images are ours. Read how it’s made

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>
<!--
  "Yard savings calculator" 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 yard savings calculator with rising numbers</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/geist-mono@5.3.0/index.css">
  <link rel="stylesheet" href="style.css">
</head>
<body>
  <main class="stage" data-stage>
    <!-- the ROI calculator of Yardline, a made-up yard operating system for logistics: three sliders on the left,
         the dark results panel on the right with a rounded notch that points at the slider being moved, the yearly
         savings counting up and the Book a demo button with the terminal's block letters -->
    <section class="calc" data-calc aria-label="Yard savings calculator">
      <div class="calc__inputs">
        <header class="calc__head">
          <span class="calc__eyebrow">Yard calculator</span>
          <h1 class="calc__title">What is your yard costing&nbsp;you?</h1>
        </header>

        <div class="knob" data-knob>
          <div class="knob__top">
            <label class="knob__label" for="k-trucks">Trucks per day</label>
            <output class="knob__value" for="k-trucks"><span data-out>180</span></output>
          </div>
          <div class="knob__rail">
            <span class="knob__track" data-track></span>
            <span class="knob__ticks" data-ticks aria-hidden="true"></span>
            <span class="knob__thumb" data-thumb aria-hidden="true"><span class="knob__face"></span></span>
            <input class="knob__input" id="k-trucks" type="range" min="40" max="400" step="10" value="180">
          </div>
        </div>

        <div class="knob" data-knob>
          <div class="knob__top">
            <label class="knob__label" for="k-gate">Average gate time</label>
            <output class="knob__value" for="k-gate"><span data-out>14</span><span class="knob__unit">min</span></output>
          </div>
          <div class="knob__rail">
            <span class="knob__track" data-track></span>
            <span class="knob__ticks" data-ticks aria-hidden="true"></span>
            <span class="knob__thumb" data-thumb aria-hidden="true"><span class="knob__face"></span></span>
            <input class="knob__input" id="k-gate" type="range" min="4" max="30" step="1" value="14">
          </div>
        </div>

        <div class="knob" data-knob>
          <div class="knob__top">
            <label class="knob__label" for="k-docks">Docks</label>
            <output class="knob__value" for="k-docks"><span data-out>24</span></output>
          </div>
          <div class="knob__rail">
            <span class="knob__track" data-track></span>
            <span class="knob__ticks" data-ticks aria-hidden="true"></span>
            <span class="knob__thumb" data-thumb aria-hidden="true"><span class="knob__face"></span></span>
            <input class="knob__input" id="k-docks" type="range" min="4" max="60" step="1" value="24">
          </div>
        </div>
      </div>

      <div class="panel" data-panel>
        <svg class="panel__shape" data-shape aria-hidden="true">
          <defs>
            <clipPath id="yl-clip" clipPathUnits="userSpaceOnUse"><path data-clip d=""/></clipPath>
            <linearGradient id="yl-body" x1="0" y1="0" x2="1" y2="1">
              <stop offset="0" style="stop-color: var(--panel-top)"/>
              <stop offset="1" style="stop-color: var(--panel)"/>
            </linearGradient>
            <linearGradient id="yl-edge" x1="0" y1="0" x2="1" y2="1">
              <stop offset="0" stop-color="#ffffff" stop-opacity=".34"/>
              <stop offset=".45" stop-color="#ffffff" stop-opacity=".05"/>
              <stop offset="1" style="stop-color: var(--lime)" stop-opacity=".22"/>
            </linearGradient>
            <radialGradient id="yl-glow">
              <stop offset="0" style="stop-color: var(--lime)" stop-opacity=".5"/>
              <stop offset=".45" style="stop-color: var(--lime)" stop-opacity=".12"/>
              <stop offset="1" style="stop-color: var(--lime)" stop-opacity="0"/>
            </radialGradient>
            <linearGradient id="yl-div" x1="0" y1="0" x2="1" y2="0">
              <stop offset="0" stop-color="#f1f5ec" stop-opacity="0"/>
              <stop offset=".22" stop-color="#f1f5ec" stop-opacity=".13"/>
              <stop offset="1" stop-color="#f1f5ec" stop-opacity=".1"/>
            </linearGradient>
            <radialGradient id="yl-haze">
              <stop offset="0" stop-color="#2f5a1c" stop-opacity=".55"/>
              <stop offset="1" stop-color="#2f5a1c" stop-opacity="0"/>
            </radialGradient>
            <pattern id="yl-grain" width="128" height="128" patternUnits="userSpaceOnUse"><image data-grain width="128" height="128" href=""/></pattern>
          </defs>
          <path class="panel__body" data-body d="" fill="url(#yl-body)"/>
          <g clip-path="url(#yl-clip)">
            <ellipse data-haze cx="0" cy="0" rx="1" ry="1" fill="url(#yl-haze)"/>
            <ellipse data-glow cx="0" cy="0" rx="1" ry="1" fill="url(#yl-glow)" opacity=".3"/>
            <path class="panel__divider" data-divider d=""/>
            <rect class="panel__grain" data-grainrect x="0" y="0" width="0" height="0" fill="url(#yl-grain)"/>
          </g>
          <path class="panel__edge" data-edge d="" stroke="url(#yl-edge)"/>
        </svg>

        <div class="panel__in">
          <p class="panel__kicker">With Yardline <span>your yard saves</span></p>
          <p class="panel__total" data-totalwrap><span class="panel__cur">$</span><span data-total>0</span><span class="panel__per">/ year</span></p>
          <p class="panel__pct"><span class="panel__pct-words">Est. savings</span>
            <span class="pct" aria-hidden="true"><span class="pct__col" data-pctcol></span><span class="pct__col" data-pctcol></span><span class="pct__sign">%</span></span>
          </p>
          <span class="panel__rule" data-rule aria-hidden="true"></span>
          <p class="panel__label">Savings by category</p>
          <ul class="items">
            <li class="item" data-item><span class="item__name">Detention fees</span><span class="item__bar"><span class="item__fill" data-fill></span></span><span class="item__amount" data-amt>$0</span></li>
            <li class="item" data-item><span class="item__name">Gate labor</span><span class="item__bar"><span class="item__fill" data-fill></span></span><span class="item__amount" data-amt>$0</span></li>
            <li class="item" data-item><span class="item__name">Dwell time</span><span class="item__bar"><span class="item__fill" data-fill></span></span><span class="item__amount" data-amt>$0</span></li>
          </ul>
          <button class="cta" type="button" data-cta>
            <span class="cta__face">
              <span class="cta__words" data-words>Book a demo</span>
              <svg class="cta__arrow" viewBox="0 0 16 16" aria-hidden="true"><path d="M3 8h9.2M8.6 4.2 12.4 8l-3.8 3.8"/></svg>
            </span>
          </button>
        </div>
      </div>
    </section>

    <!-- the drawn pointer of the walk on its own -->
    <div class="hand" data-hand aria-hidden="true">
      <svg class="hand__svg" data-handsvg viewBox="0 0 24 24"><path d="M4.2 2.6v16.6l4.3-4.1 2.9 6.4 2.9-1.3-2.8-6.3h6.1z"/></svg>
    </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="https://cdn.jsdelivr.net/npm/gsap@3.15.0/dist/CustomEase.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.

46 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 “Yard savings calculator” 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 light grey green page with a soft light in the middle and a touch of grain, a white card with a layered shadow rises. On the left ‘Yard calculator’, the title ‘What is your yard costing you?’ and three sliders: Trucks per day, Average gate time in minutes and Docks, each with its value in terminal type, a thin track coloured up to its thumb by a computed gradient and a row of small ticks beneath that darken as the thumb goes by. On the right the dark teal results panel, with round corners, a tab on top and a rounded notch cut into its left edge that slides to the height of the slider being moved; the 1 pixel edge catches the light, inside there is a green haze and a fine grain. ‘With Yardline your yard saves’, the big yearly savings in dollars, the lime pill of the percentage and, under a divider that curves towards the edge, three lines: Detention fees, Gate labor and Dwell time with their bars. At the bottom the lime ‘Book a demo’ button. On opening the sliders run from their minimum to their values, the numbers rise, the notch opens and the button's letters print themselves. Then a drawn pointer drags the sliders one after the other: the thumb squeezes and lights up lime, the notch follows it, the line that changes lights up with a lime bar, the total rises or falls in six tenths of a second with a lime glow following it, the percentage's digits roll. The pointer goes over the button, the even letters flash as blocks, it presses it, and it brings the sliders back where they were. At the first real touch the pointer leaves and the sliders are yours.

How it works

The track coloured up to the thumb

Each slider is a real range input, invisible, laid over the drawn track. At every move the track gets a computed linear-gradient: dark teal from 0 to the thumb's position in percent, then the empty grey. While the thumb is pressed, the last stretch before it turns lime green.

The notch as an SVG path

The dark panel's shape is one path rebuilt every frame: the four round corners, the tab on top and the notch on the left edge, a four point trapezoid with its corners rounded by Bézier curves. The same path is the fill, the edge of light and the clipPath for the haze, the glow, the divider and the grain.

The notch that follows the slider

The notch's position chases the active slider's with an exponential damp (lambda 6): on a computer at the slider's height, on a phone, where the card stacks, along the top edge under the thumb. Pressing deepens it by 7 pixels with the curve .67,.05,.43,1.

The rising numbers

The total and the three lines are an object of values that GSAP carries to the new ones in 0.6 s with power2.out; every frame they are written with toLocaleString en-US and the bars grow in scaleX. The percentage instead has two columns of digits from 0 to 9 that roll to theirs, and a lime glow inside the clipPath lights up in proportion to the jump and follows the end of the number.

The terminal's block letters

The button's label is split into letters by hand. On entering each letter appears every 0.05 s; the even ones start as a solid block, fill and text the same colour, and after a random delay between 0.1 and 0.6 s they print in 0.02 s. On hover the even ones flash as blocks 0.025 s apart for 0.2 s; on leaving the odd ones do, in reverse.

Values to change

NameFileDefaultWhat it changes
TRUCKSscript.js180Trucks per day at the start (40 to 400).
GATE_MINUTESscript.js14The average gate time at the start, in minutes (4 to 30).
DOCKSscript.js24The docks at the start (4 to 60).
HOURLY_WAGEscript.js31What an hour of gate labor costs, in dollars.
DETENTION_FEEscript.js65What one late truck costs, in dollars.
COUNT_DURATIONscript.js0.6The seconds the numbers take to reach a new value.
NOTCH_DEPTHscript.js32How deep the notch cuts into the dark panel, in pixels.
NOTCH_RADIUSscript.js20The rounding of the panel's corners; the notch's own are half.
SPEEDscript.js12 = the walk on its own twice as fast, 0.5 = half.
LOOPscript.jstrueRepeats the walk on its own.

Try them in the Playground

When to use it

For the pricing page or the landing page of a B2B software, a SaaS or a service with savings to show: a return on investment calculator, a quote, a cost simulator right before the button to book a demo.

On phones

The same animation with adapted sizes: the card stacks, sliders above and the result below, and the notch moves to the top edge of the dark panel, under the moving thumb; the percentage moves next to the total and the button takes the full width.

With reduced motion

No pointer and no movement: the values change every few seconds already in place, the numbers and lines fade back in, the notch is already where it belongs and the button's letters fade in instead of printing as blocks.

Pitfalls

  • GSAP moves the thumb with its transform, so the pressure (the squeeze, the halo, the lime core) lives on the child face, .knob__face: one owner per element.
  • In the tween that drags a slider the start value must be read when the tween begins (a function in the fromTo), not when the walk is built, otherwise the thumb jumps.
  • The thumb dragged by the pointer moves freely and only the value steps; on release a small spring settles it on its step, like a real slider.
  • The same path has to serve as fill, edge and clipPath: computed separately, at the first resize the edge of light and the haze no longer match.

Libraries

GSAP 3.15.0, CustomEase (GSAP) 3.15.0, Mona Sans (font variabile) 5.3.0, Geist Mono (font variabile) 5.3.0.

Compressed with gzip, the three demo files weigh 13 KB; the libraries: GSAP + CustomEase 31 KB.

Testing

Tested on 3 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 animations