
The elastic button
Buttons, Hover, Text
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.
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>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
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 siteWatching, 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 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.
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.
| Name | File | Default | What it changes |
|---|---|---|---|
LEAD | script.js | #3ddc84 | The colour for when you lead. |
OUT | script.js | #ff7a45 | The colour for when you are outbid. |
START | script.js | 1240 | The starting bid, in euros. |
STEP | script.js | 20 | How much each bid goes up, in euros. |
TIME | script.js | 9 | The seconds left at the start. |
EXTEND | script.js | 5 | If a bid lands under these seconds, the clock goes back here. |
RIVAL | script.js | 2 | After how many seconds someone bids more (once only). |
HOLD | script.js | 2.6 | Once the lot is sold, the seconds before the auction starts again. |
LOOP | script.js | true | Left alone, a pointer places the bids. |
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.
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.
The figure is already written and the clock runs. Bids, colours and labels change without motion: no jolt, no gavel coming down.
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.
Tested on 19 November 2026
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.
Support Animorio
Animorio stays free thanks to the people who support it. If you like, buy us a coffee: it helps us make the next animations.
You asked for
We made it for you: it’s in the library, with the preview, the Playground and the code to copy.
An animation you can’t find, or a site to take apart in the journal: tell us which. We pick the next ones from here.
With your account’s email and password.
or with your email
You’re signed in as .
With your account, you can download the zip of every animation and every pack, for free.