Skip to content
animorio
IT
All components

Glass pricing plans

Pricing, HoverGSAP, CSS onlyMediumCompressed weight: Demo 7.0 KBGSAP 28 KBFreeDownload the zip

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.

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>
<!--
  "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>

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.

40 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 “Glass pricing plans” 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 a near black background, at the top the name Vesperly plans with a small drawn star, the headline Write with a quieter AI and a two-way glass switch, Monthly and Yearly with 2 months free. Below, three dark glass cards, Free, Pro with the Popular label and Team, each with a large price, a line and two features with checkmarks. Behind the cards there is a blurred violet light: when a plan is picked it glides under that card on a spring and swells a little as it arrives, the card rises three pixels and lights up, the checkmarks turn violet, and a reflection runs along its border, from violet to white, going round just once and fading. Pressing Yearly the glass pill slides onto the option and squashes for a moment, and the prices roll digit by digit, one card after the other, from 16 to 13 and from 32 to 27; the line at the bottom says how much a year costs. The white button on the right rolls to Choose Pro, Choose Team or Start for free, and when pressed it squashes and comes back with an elastic bounce. The autopilot pointer picks Team, switches to yearly, picks Pro, presses the button and switches back to monthly.

How it works

One light behind the cards

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

The reflection that goes round once

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.

Rolling prices

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.

Switch and button

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.

Values to change

NameFileDefaultWhat it changes
START_PLANscript.js1The plan picked at the start: 0 Free, 1 Pro, 2 Team.
PRO_PRICEscript.js16The monthly price of the Pro plan, in dollars.
TEAM_PRICEscript.js32The monthly price per seat of the Team plan.
MONTHS_FREEscript.js2How many months yearly billing gives for free.
LIGHT_SPEEDscript.js0.7How many seconds the light takes to glide behind the picked plan.
RING_SPEEDscript.js1.1How many seconds the reflection takes to go round the border.
ACCENTscript.js#8b8cffThe colour of the light, the reflection and the checkmarks.

Try them in the Playground

When to use it

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.

On phones

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.

With reduced motion

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.

Pitfalls

  • To spin a conic-gradient with GSAP the angle must be a variable registered with @property (syntax angle): without it the browser cannot interpolate it and the reflection jumps from end to end.
  • The light must be measured with the cards’ offsetLeft and offsetWidth, not getBoundingClientRect: when the demo is scaled down the latter returns scaled sizes and the light lands off place.
  • The cards’ backdrop-filter needs the light behind them in the same context: with isolation: isolate on the container and a negative z-index on the light it stays under the cards but above the background.

Libraries

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.

Testing

Tested on 28 October 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