Skip to content
animorio
IT
All components

Car finance card

Cards, Hover, TransitionsGSAP, CSS onlyMediumCompressed weight: Demo 11 KBGSAP 28 KBFreeDownload the zip

The listing card of a used car from a made-up dealer, Northvale Motors, on white: the touring car drawn in fine lines rolls in with its wheels turning, brakes, dips on its front springs and settles while a studio light sweeps along the paint. The specs (mileage, year, gearbox, fuel) reveal one after the other and the price rolls in on reels. Drag the deposit and the handle snaps to every 500 euro on a spring, the ticks under it rise like under a lens and the monthly payment is worked out again digit by digit on rolling reels; Book a test drive fills with green and confirms the slot.

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>
<!--
  "Car finance card" 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 car for sale card with the monthly payment worked out from the deposit</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 listing card of Northvale Motors, an invented car dealer: a touring car drawn in fine lines rolls in and
         settles on its springs, the specs reveal one after the other, and dragging the deposit works out the monthly
         payment again, digit by digit on rolling reels -->
    <article class="lot" data-lot aria-labelledby="lot-title">
      <span class="lot__grain" aria-hidden="true"></span>
      <span class="lot__edge" aria-hidden="true" data-edge></span>

      <header class="lot__head">
        <span class="lot__badge">
          <svg viewBox="0 0 16 16" aria-hidden="true"><path d="M8 1.8 13 3.6v4c0 3-2.1 5.3-5 6.6-2.9-1.3-5-3.6-5-6.6v-4z"/><path class="lot__badge-tick" d="m5.6 8 1.7 1.7 3.2-3.4"/></svg>
          <span>Certified pre-owned</span>
        </span>
        <button class="lot__save" type="button" aria-pressed="false" aria-label="Save this car" data-save>
          <svg viewBox="0 0 20 20" aria-hidden="true"><path d="M6 3.5h8a.5.5 0 0 1 .5.5v12.3L10 13.4l-4.5 2.9V4a.5.5 0 0 1 .5-.5z"/></svg>
        </button>
      </header>

      <div class="car" data-car aria-hidden="true">
        <svg class="car__svg" viewBox="0 0 320 112">
          <defs>
            <linearGradient id="car-body" x1="0" y1="0" x2="0" y2="1">
              <stop offset="0" stop-color="#ffffff"/>
              <stop offset="0.55" stop-color="#f1f1ee"/>
              <stop offset="1" stop-color="#e2e2dd"/>
            </linearGradient>
            <linearGradient id="car-glass" x1="0" y1="0" x2="0.4" y2="1">
              <stop offset="0" stop-color="#2a2c2f"/>
              <stop offset="1" stop-color="#5d6166"/>
            </linearGradient>
            <linearGradient id="car-sweep" x1="0" y1="0" x2="1" y2="0">
              <stop offset="0" stop-color="#fff" stop-opacity="0"/>
              <stop offset="0.5" stop-color="#fff" stop-opacity="0.95"/>
              <stop offset="1" stop-color="#fff" stop-opacity="0"/>
            </linearGradient>
            <radialGradient id="car-brake">
              <stop offset="0" stop-color="#ff4a2e" stop-opacity="0.85"/>
              <stop offset="1" stop-color="#ff4a2e" stop-opacity="0"/>
            </radialGradient>
            <radialGradient id="car-shadow">
              <stop offset="0" stop-color="#1b1c1e" stop-opacity="0.34"/>
              <stop offset="1" stop-color="#1b1c1e" stop-opacity="0"/>
            </radialGradient>
            <clipPath id="car-clip"><path d="M24 82 L20 70 Q19 58 28 52 L44 32 Q48 28 56 27 L176 26 Q190 26 202 33 L238 50 Q276 54 296 60 Q304 63 304 72 L302 82 L266 82 A20 20 0 0 0 226 82 L98 82 A20 20 0 0 0 58 82 Z"/></clipPath>
          </defs>
          <ellipse class="car__shadow" data-shadow cx="162" cy="99" rx="150" ry="7" fill="url(#car-shadow)"/>
          <g data-body-wrap>
            <g data-body>
              <path class="car__paint" d="M24 82 L20 70 Q19 58 28 52 L44 32 Q48 28 56 27 L176 26 Q190 26 202 33 L238 50 Q276 54 296 60 Q304 63 304 72 L302 82 L266 82 A20 20 0 0 0 226 82 L98 82 A20 20 0 0 0 58 82 Z"/>
              <path class="car__glass" d="M50 48 L64 33 Q67 31 72 31 L124 31 L124 48 Z"/>
              <path class="car__glass" d="M131 31 L174 31 Q185 31 194 37 L211 48 L131 48 Z"/>
              <g clip-path="url(#car-clip)">
                <rect class="car__sweep" data-sweep x="-80" y="0" width="70" height="112" fill="url(#car-sweep)" transform="skewX(-18)"/>
              </g>
              <path class="car__glint" d="M70 33 L60 46 M140 33 L134 46"/>
              <path class="car__line" d="M24 82 L20 70 Q19 58 28 52 L44 32 Q48 28 56 27 L176 26 Q190 26 202 33 L238 50 Q276 54 296 60 Q304 63 304 72 L302 82 L266 82 A20 20 0 0 0 226 82 L98 82 A20 20 0 0 0 58 82 Z"/>
              <path class="car__line car__line--fine" d="M28 54 L236 51 M127 50 L128 80 M204 51 L206 78 M30 65 Q166 60 298 66"/>
              <path class="car__line car__line--fine" d="M108 58 h10 M184 58 h10"/>
              <path class="car__line" d="M212 47 q7 -3 11 2"/>
              <path class="car__lamp" d="M284 60 Q296 62 301 67"/>
              <path class="car__lamp car__lamp--rear" d="M21 60 L29 57"/>
              <ellipse class="car__brake" data-brake cx="24" cy="58.6" rx="11" ry="6" fill="url(#car-brake)" opacity="0"/>
            </g>
          </g>
          <g class="car__wheel" data-wheel transform="translate(78 82)">
            <circle r="16" class="car__tyre"/>
            <circle r="10.5" class="car__rim"/>
            <g class="car__spokes" data-spokes><path d="M0 -10 V-3 M9.5 -3.1 L2.9 -0.9 M5.9 8.1 L1.8 2.4 M-5.9 8.1 L-1.8 2.4 M-9.5 -3.1 L-2.9 -0.9"/></g>
            <circle r="2.2" class="car__hub"/>
          </g>
          <g class="car__wheel" data-wheel transform="translate(246 82)">
            <circle r="16" class="car__tyre"/>
            <circle r="10.5" class="car__rim"/>
            <g class="car__spokes" data-spokes><path d="M0 -10 V-3 M9.5 -3.1 L2.9 -0.9 M5.9 8.1 L1.8 2.4 M-5.9 8.1 L-1.8 2.4 M-9.5 -3.1 L-2.9 -0.9"/></g>
            <circle r="2.2" class="car__hub"/>
          </g>
          <path class="car__floor" d="M6 98.5 H314"/>
        </svg>
      </div>

      <div class="lot__title">
        <div>
          <h2 class="lot__name" id="lot-title">Aster GT Touring</h2>
          <p class="lot__dealer">Northvale Motors · 2.0 Hybrid</p>
        </div>
        <p class="lot__price"><span class="sr">Price </span><span class="cur">€</span><span class="reels" data-price></span></p>
      </div>

      <dl class="specs" data-specs>
        <div class="spec"><dt>Mileage</dt><dd>38,400 km</dd></div>
        <div class="spec"><dt>Year</dt><dd>2022</dd></div>
        <div class="spec"><dt>Gearbox</dt><dd>Automatic</dd></div>
        <div class="spec"><dt>Fuel</dt><dd>Hybrid</dd></div>
      </dl>

      <section class="fin" data-fin aria-label="Finance">
        <div class="fin__row">
          <label class="fin__label" for="deposit">Deposit</label>
          <span class="fin__dep" data-dep-text>€6,000</span>
        </div>
        <div class="slider" data-slider>
          <span class="slider__glow" data-glow aria-hidden="true"></span>
          <span class="slider__ticks" data-ticks aria-hidden="true"></span>
          <span class="slider__thumb" data-thumb aria-hidden="true"><span class="slider__knob"></span></span>
          <input class="slider__input" id="deposit" type="range" min="0" max="14000" step="500" value="6000" data-input aria-describedby="monthly">
        </div>
        <div class="fin__out">
          <p class="fin__monthly" id="monthly" aria-live="polite"><span class="cur">€</span><span class="reels reels--big" data-monthly></span><span class="fin__per">/mo</span></p>
          <p class="fin__terms"><span data-term>48</span> months · <span data-apr>5.9</span>% APR<br><span data-financed>€21,900</span> financed</p>
        </div>
      </section>

      <button class="lot__cta" type="button" data-cta>
        <span class="lot__cta-fill" aria-hidden="true"></span>
        <span class="lot__cta-text" data-cta-idle>Book a test drive</span>
        <span class="lot__cta-text lot__cta-text--done" data-cta-done aria-hidden="true">
          <svg viewBox="0 0 20 20"><path data-cta-tick d="m5 10.4 3.2 3.2L15 6.8"/></svg>
          Saturday, 10:30
        </span>
      </button>
    </article>
    <svg class="pointer" viewBox="0 0 24 24" aria-hidden="true" data-pointer><path d="M5 3.5 18.5 12 12.4 13.6 9.4 19.6z"/></svg>
    <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.

44 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 “Car finance card” 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 warm white card with a green Certified pre-owned badge and a bookmark to save the car. The car, drawn in fine lines with dark glass and a soft shadow on the floor, comes in from the left with its wheels turning as far as the road it covers, brakes with its brake lights glowing, dipping a little on its front springs, goes past by a hair and settles; then a studio light passes along the paint. Below, the name, the dealer and the price rolling in on reels; the four specs rise one after the other between hairlines. The deposit slider has a tick every 500 euro: the handle snaps from one to the next with a small bounce, the nearby ticks rise and those on the left turn green, a pool of light follows it. At every snap the monthly payment rolls digit by digit to its new value, with the months, the rate and what is left to finance. Book a test drive widens when touched, fills with green and states the slot with a tick that draws itself; tapped again it goes back. Left alone the card runs by itself: a drawn pointer saves the car, moves the deposit up and down, books the drive, then the car pulls away to the right and comes in again.

How it works

An SVG car that really rolls

The car is a single SVG: body, glass, fine lines and two wheels. As the SVG moves by x, the spokes turn by x divided by the wheel radius (in SVG units, so x divided by the scale), so the wheels never slip. With svgOrigin on the front wheel the body tilts by a degree when braking and comes back on a spring; pulling away it squats on the rear wheel.

The studio light on the paint

A skewed rectangle with a transparent white gradient, clipped by a clipPath with the same shape as the body, slides with attr x from one side to the other: it only shows on the paint, never on the glass or outside. It passes on arrival and every time the pointer enters the car.

The reels

Every digit is a column from 0 to 9, ten lines tall, in a window one line tall, with a mask fading at the top and bottom. To show digit n the column goes to yPercent -10n with back.out, staggered from the right like an odometer. If the number of digits changes the row is rebuilt from zero.

The slider with the lens

Underneath is a real range input, transparent, for keys and screen readers; with the pointer the value is worked out from the finger's x. The value is rounded to STEP and the handle goes to its x with back.out(SNAP): that is why it snaps. On every frame each tick rises by 1 + LENS times a Gaussian bell of its distance from the handle, and those on the left turn green.

The payment

The payment is that of a fixed instalment loan: (price minus deposit) times r, divided by 1 minus (1 + r) to the minus TERM, with r the yearly rate divided by 1200. Every snap of the deposit works it out again and sends it to the reels, together with the text of what is left to finance.

The pilot

One timeline: the entrance, the drawn pointer saving the car, dragging the deposit to 11,000 and to 2,500 (a proxy object passes the value to setDeposit), booking the drive, then everything goes back and the car pulls away; it starts again the same. At the first real mouse move, tap or key the pilot stops and the card stays still and ready.

Values to change

NameFileDefaultWhat it changes
PRICEscript.js27900The price of the car, in euro.
TERMscript.js48Months of the finance.
APRscript.js5.9The yearly rate, in percent.
DEPOSITscript.js6000The deposit the card starts with.
MAX_DEPOSITscript.js14000The right end of the slider.
STEPscript.js500The handle snaps to every STEP euro.
SNAPscript.js2.2How far the handle overshoots when it snaps (0 none).
ROLLscript.js0.62Seconds for the digits to roll to their new value.
LENSscript.js1.4How much the ticks rise under the handle.
SPEEDscript.js1Pilot speed.
LOOPscript.jstrueThe pilot starts over.

Try them in the Playground

When to use it

On the landing page of a car dealer, in a list of used cars, on the page of a car or of anything paid in instalments (motorbikes, e-bikes, kitchens, furniture): the product card with its specs and a monthly payment visitors work out by themselves, without a form.

On phones

The same animation with adapted sizes: the card is 90% of the screen wide and the car, the gaps, the large figures and the button also follow the height, so the card fits the phone box. The slider is dragged with a finger without scrolling the page.

With reduced motion

Nothing moves: the car and the specs fade in already in place, digits change without rolling, the handle jumps to its tick and the pilot does not start.

Pitfalls

  • The studio light is a skewed rectangle passing over the car: without a clipPath shaped like the body it also showed on the glass and outside the outline.
  • The wheels turn in SVG units, not pixels: with the SVG scaled down on a phone the rotation must be divided by the scale, or the wheels slip.
  • The transparent range input moves its invisible thumb along a shorter track than ours: with the pointer the value comes from the finger's x on the bar, and the input stays for keys and screen readers only.

Libraries

GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.

Compressed with gzip, the three demo files weigh 11 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