Skip to content
animorio
IT
All components

Auction lot card

Cards, HoverGSAP, CSS onlyMediumCompressed weight: Demo 6.7 KBGSAP 28 KBFreeDownload the zip

A live auction lot, on black: the bid counts up, the last three bids queue in a strip, the clock drains and stretches when a bid lands near the end. Leading, the card is green; outbid, it turns orange and jolts; when time is up the gavel comes down twice.

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>
<!--
  "Auction lot 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>Auction lot card</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">
    <!-- a live auction lot: the bid counts up, the last bids queue in a strip, the clock drains and
         stretches when a bid lands near the end; lead, outbid and sold each give the card its colour -->
    <section class="au" data-au aria-label="Auction lot">
      <header class="au__head">
        <span class="au__tile" aria-hidden="true">
          <svg viewBox="0 0 24 24">
            <path class="au__block" d="M4 19.500h9"></path>
            <g data-gavel transform="rotate(0 7 15)">
              <path d="M7 15 14.500 7.500"></path>
              <path class="au__head-bar" d="M12.200 4.800 17.200 9.800"></path>
              <path d="M10.800 6.200 15.800 11.200" opacity="0"></path>
            </g>
          </svg>
        </span>
        <span class="au__who">
          <b>Brass desk lamp, 1962</b>
          <span>Lot 27, Halden Auctions</span>
        </span>
        <span class="au__live"><span class="au__roll"><span data-live>Live</span></span></span>
      </header>

      <div class="au__bid">
        <span class="au__label">Current bid</span>
        <div class="au__line">
          <b class="au__num" data-num>€0</b>
          <span class="au__state"><span class="au__roll"><span data-state></span></span></span>
        </div>
      </div>

      <div class="au__strip" data-strip aria-label="Latest bids"></div>

      <div class="au__clock">
        <div class="au__clock-row">
          <span>Ends in</span>
          <span class="au__plus" data-plus aria-hidden="true"></span>
          <b data-time>0:00</b>
        </div>
        <span class="au__bar"><i data-bar></i></span>
      </div>

      <button class="au__btn" type="button" data-btn>
        <span class="au__wash" data-wash aria-hidden="true"></span>
        <span class="au__roll au__btn-label"><span data-label></span></span>
      </button>
    </section>

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

23 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 “Auction lot 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

On black, a dark card with a lilac light from its corner: at the top the gavel, the lot’s name and the “Live” pill; below, “Current bid” and the big figure, with how many are bidding beside it. A strip holds the last three bids with the initials of who made them, then “Ends in” with the time and a thin bar draining. At first the figure counts up from zero and the clock starts. Pressing “Bid”, your own bid comes into the strip from the left and pushes the others along, the figure rises without overshooting, and the whole card turns green: “You lead”. Two seconds later someone bids more: the card jolts sideways, turns orange, “Outbid”, and the button offers the next raise. If a bid lands in the last seconds the clock goes back to five, with a “+2 s” appearing and the bar swelling for a moment. When time is up the gavel comes down twice on its block, the card barely shakes, the pill says “Sold” and the button “Won for €1,300” with a green opening from the middle.

How it works

One state, one colour

Watching, leading, outbid, sold: the state is a single word, and its colour lives in the --tone variable that GSAP animates. The corner light, the gavel, the pill, the bar and the shadow all read it.

The three-place strip

The bids are absolutely positioned elements with their x worked out from their place: the new one springs in on the left, the others move one place along, the fourth leaves on the right and is removed.

The clock that stretches

Time is a linear tween of a single number. If a bid lands under EXTEND seconds, the number goes back to EXTEND and the tween restarts: the rule against last-instant bids.

Values to change

NameFileDefaultWhat it changes
LEADscript.js#3ddc84The colour for when you lead.
OUTscript.js#ff7a45The colour for when you are outbid.
STARTscript.js1240The starting bid, in euros.
STEPscript.js20How much each bid goes up, in euros.
TIMEscript.js9The seconds left at the start.
EXTENDscript.js5If a bid lands under these seconds, the clock goes back here.
RIVALscript.js2After how many seconds someone bids more (once only).
HOLDscript.js2.6Once the lot is sold, the seconds before the auction starts again.
LOOPscript.jstrueLeft alone, a pointer places the bids.

Try them in the Playground

When to use it

On a lot page of an auction house or a second-hand marketplace, for collectibles, cars, art, wine; in a shop’s timed sales; and wherever a price climbs live against a deadline.

On phones

The same card, as wide as the screen: the button is pressed with a thumb. Figure and spacing are also sized on the window’s height, and the strip’s places are worked out again if the width changes.

With reduced motion

The figure is already written and the clock runs. Bids, colours and labels change without motion: no jolt, no gavel coming down.

Pitfalls

  • Lot, auction house, names and bids are made up, and the other bidder is fake: in a real auction bids and time come from the server, and the viewer’s clock must be synced with it.
  • A bid is a commitment to buy: in a real product a raise needs a confirmation first, and the button stays disabled until the server answers.
  • The state is not told by colour alone: “You lead”, “Outbid” and “Sold to you” are written, and the button has aria-disabled while you lead.

Libraries

GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.

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

Testing

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