
Long shadow letters
Text, Scroll, 3D
The price of a made-up lounge chair going on sale, in the clean style of today’s shops with variable type in the lead: an orange line strikes the full price, its digits come loose and fall one at a time with a slight turn, and the new price arrives digit by digit, heavy and then lighter, one pixel past its place before settling. Beside it the discount tag opens with a spring, below the old price stays small and crossed out and the time left in the sale appears.
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>
<!--
"Discounted price drop" 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 price that drops, the old figure falling away</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 price of a made-up chair goes on sale: a line strikes the old price, its digits come loose and fall one by
one, the new price arrives digit by digit with a weight that settles, and the -20% tag opens with a spring -->
<section class="offer" aria-label="Arlo lounge chair, on sale" data-frame>
<p class="eyebrow"><span class="eyebrow__brand" data-brand>Fenwold</span><span class="eyebrow__soft">Arlo lounge chair</span></p>
<p class="sub">Solid oak and wool, made to order</p>
<div class="price-row">
<div class="price" data-price aria-live="polite">
<span class="price__old" data-old aria-hidden="true"></span>
<span class="price__new" data-new aria-hidden="true"></span>
<svg class="strike" data-strike viewBox="0 0 100 10" preserveAspectRatio="none" aria-hidden="true"><path d="M1 6.2 C 30 4.6, 70 5.4, 99 3.6"/></svg>
<span class="sr" data-sr>$1,250</span>
</div>
<span class="tag" data-tag aria-hidden="true"><span class="tag__in" data-tag-in>−20%</span></span>
</div>
<div class="meta">
<span class="was" data-was aria-hidden="true"><span class="was__num" data-was-num>$1,250</span></span>
<span class="ends" data-ends>
<svg class="clock" viewBox="0 0 16 16" aria-hidden="true"><circle cx="8" cy="8" r="6.2"/><path d="M8 4.8V8l2.2 1.4" data-hand/></svg>
<span>Sale ends in 2 days</span>
</span>
</div>
<div class="rule" aria-hidden="true"><span class="rule__fill" data-rule></span></div>
<p class="note" data-note>Free delivery and 30-day returns</p>
</section>
</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.
22 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 “Discounted price drop” from Animorio and fit it into my siteThe full price and the sale price sit in the same grid cell, one on top of the other, and each character has its own span: GSAP moves the span, never the text, and the dollar sign is smaller and raised.
The striking line is a slightly curved SVG path, with preserveAspectRatio none and vector-effect non-scaling-stroke so it stays thin at any size. It draws itself with stroke-dashoffset in 0.42 seconds with power2.inOut, then falls along with the digits.
Each old digit drops by more than half its height, with a random turn between minus 16 and 16 degrees, and fades out with power2.in, seven and a half hundredths after the one before: so they come loose one at a time instead of falling as a block.
The weight of each digit is the --wg variable inside font-variation-settings: GSAP takes it from 300 to 740 and then to 560 with keyframes, while the digit drops to its place plus OVERSHOOT pixels with power3.out and another tween brings it back to zero.
The tag opens from 0.5 to 1 with back.out(2.4) and its width goes from 70 to 100 on the wdth axis; the small old price is crossed out by a pseudo-element in scaleX read from --barra, and the clock hand turns once around its centre with svgOrigin.
| Name | File | Default | What it changes |
|---|---|---|---|
PRODUCT | script.js | 'Arlo lounge chair' | The name of the made-up product on sale. |
PRICE | script.js | 1250 | The full price, in dollars. |
DISCOUNT | script.js | 20 | The discount as a percentage: the new price and the tag are worked out from it. |
FALL | script.js | 0.55 | The seconds of an old digit falling. |
OVERSHOOT | script.js | 1 | The pixels the new digit goes past its place before settling. |
HOLD | script.js | 4.2 | The seconds the sale price stays still before going back to full. |
For the page of a product on sale, a promotion page or a shop’s Black Friday: the discount is seen happening, not just read, and the old price stays beside it to say how much is saved.
The same animation with adapted sizes: the digits are sized on width and height together, the tag stays beside the price and the lines below narrow with them.
No falls and no springs: the full price fades into the sale price, and the tag, the crossed-out old price and the end of the sale fade in already in place.
GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 4.6 KB; the libraries: GSAP 28 KB.
Tested on 27 October 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.