
The elastic button
Buttons, Hover, Text
The pricing table of an AI writing app, on near black, with its three plans in dark glass cards: a soft light behind the cards glides under the plan you pick and settles with a small swell, the picked plan’s border catches a reflection that runs round just once, and the glass switch between monthly and yearly rolls the prices digit by digit; the button at the bottom rewrites itself with the plan’s name and presses with an elastic bounce.
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>
<!--
"Glass pricing plans" 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 glass pricing plans with a light that follows your pick</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>
<!-- three plans of an AI writing app in dark glass cards: a soft light behind them follows the plan you pick,
the picked card's border catches a reflection that runs round once, and the prices roll from monthly to yearly -->
<section class="pricing" data-card aria-label="Pricing">
<header class="head">
<p class="eyebrow"><svg viewBox="0 0 16 16" aria-hidden="true"><path d="M8 1.8 9.4 6.6 14.2 8 9.4 9.4 8 14.2 6.6 9.4 1.8 8 6.6 6.6Z"/></svg>Vesperly plans</p>
<h1 class="title">Write with a quieter AI</h1>
<div class="billing" data-billing role="switch" aria-checked="false" tabindex="0" aria-label="Billed yearly">
<span class="billing__opt" data-opt="0">Monthly</span>
<span class="billing__opt" data-opt="1">Yearly <em class="billing__save">2 months free</em></span>
<span class="billing__thumb" data-thumb aria-hidden="true"></span>
</div>
</header>
<div class="plans" data-plans>
<span class="plans__light" data-light aria-hidden="true"></span>
<button class="plan" type="button" data-plan="0">
<span class="plan__ring" aria-hidden="true"></span>
<span class="plan__name">Free</span>
<span class="plan__price"><span class="plan__cur">$</span><span class="roll" data-price></span><span class="plan__per">/mo</span></span>
<span class="plan__line">For trying it out</span>
<span class="plan__feats">
<span class="feat"><svg viewBox="0 0 16 16" aria-hidden="true"><path d="M3.5 8.4 6.6 11.3 12.5 4.8"/></svg>30 drafts a month</span>
<span class="feat"><svg viewBox="0 0 16 16" aria-hidden="true"><path d="M3.5 8.4 6.6 11.3 12.5 4.8"/></svg>One writing voice</span>
</span>
</button>
<button class="plan" type="button" data-plan="1">
<span class="plan__ring" aria-hidden="true"></span>
<span class="plan__name">Pro <em class="plan__tag">Popular</em></span>
<span class="plan__price"><span class="plan__cur">$</span><span class="roll" data-price></span><span class="plan__per">/mo</span></span>
<span class="plan__line">For daily writers</span>
<span class="plan__feats">
<span class="feat"><svg viewBox="0 0 16 16" aria-hidden="true"><path d="M3.5 8.4 6.6 11.3 12.5 4.8"/></svg>Unlimited drafts</span>
<span class="feat"><svg viewBox="0 0 16 16" aria-hidden="true"><path d="M3.5 8.4 6.6 11.3 12.5 4.8"/></svg>Five writing voices</span>
</span>
</button>
<button class="plan" type="button" data-plan="2">
<span class="plan__ring" aria-hidden="true"></span>
<span class="plan__name">Team</span>
<span class="plan__price"><span class="plan__cur">$</span><span class="roll" data-price></span><span class="plan__per">/seat</span></span>
<span class="plan__line">For shared style guides</span>
<span class="plan__feats">
<span class="feat"><svg viewBox="0 0 16 16" aria-hidden="true"><path d="M3.5 8.4 6.6 11.3 12.5 4.8"/></svg>Shared brand voice</span>
<span class="feat"><svg viewBox="0 0 16 16" aria-hidden="true"><path d="M3.5 8.4 6.6 11.3 12.5 4.8"/></svg>Admin and SSO</span>
</span>
</button>
</div>
<footer class="foot">
<p class="foot__note" data-note>Billed monthly, cancel any time.</p>
<button class="cta" type="button" data-cta><span class="cta__mask"><span class="cta__label" data-cta-label>Choose Pro</span></span>
<svg viewBox="0 0 16 16" aria-hidden="true"><path d="M3 8h9.5M8.6 4.2 12.5 8l-3.9 3.8"/></svg></button>
</footer>
</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.
40 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 “Glass pricing plans” from Animorio and fit it into my siteUnder the three plans there is a single element with a radial gradient and a blur filter: GSAP takes it to the centre of the picked card, a third wider than the card, with back.out, and a scale from 0.9 to 1 with elastic.out gives it the swell. The cards are glass with backdrop-filter, so the light shows through.
Each card has a thin ring made with a conic-gradient masked to the border only; the starting angle is a CSS variable registered with @property, and GSAP takes it from 0 to 360 degrees in just over a second, fading the ring in and out at the start and end.
Each price is made of columns with the digits 0 to 9 stacked; GSAP moves each column to yPercent minus ten times the digit, with a small delay per column and per card, so the prices change in a wave. Empty columns close to zero width.
The switch pill is measured on the option’s offsetLeft and offsetWidth and squashes as it arrives; the button changes its label by sending the old one out at the top before the new one comes in from below, so two labels are never readable together.
| Name | File | Default | What it changes |
|---|---|---|---|
START_PLAN | script.js | 1 | The plan picked at the start: 0 Free, 1 Pro, 2 Team. |
PRO_PRICE | script.js | 16 | The monthly price of the Pro plan, in dollars. |
TEAM_PRICE | script.js | 32 | The monthly price per seat of the Team plan. |
MONTHS_FREE | script.js | 2 | How many months yearly billing gives for free. |
LIGHT_SPEED | script.js | 0.7 | How many seconds the light takes to glide behind the picked plan. |
RING_SPEED | script.js | 1.1 | How many seconds the reflection takes to go round the border. |
ACCENT | script.js | #8b8cff | The colour of the light, the reflection and the checkmarks. |
On the pricing page of an AI app or any dark-looking software: visitors understand at a glance which plan they picked, because the light follows it, and see straight away how much they save paying yearly.
The three cards stay in a row but more compact, with only the name and the price; the bottom line and the button stack, with the button as wide as the table. The light and the reflection work the same, with a tap instead of a click.
No springs, rolling or reflections: the light moves straight behind the picked plan, the prices change without rolling, and the autopilot shows Team, yearly, Pro and monthly one after another.
GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 7.0 KB; the libraries: GSAP 28 KB.
Tested on 28 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.