
The star rating
Ratings, SVG, Hover
The Enhance button of an app that improves photos with artificial intelligence, made of frosted glass on black, like a Dribbble shot: under the glass a violet and a cyan drift slowly, the top edge catches the light and the button throws a coloured glow beneath itself. On hover a comet of light runs around the edge and a soft light follows the pointer; pressed, the glass gives and springs back, and the comet becomes the progress of the job: it starts at the top centre and traces the edge as far as the job has gone, with the percentage counting. At 100 the edge closes, flashes, a reflection crosses the glass and the words become Enhanced with a check and 4K.
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 Enhance button" 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 Enhance button with the progress on its edge</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">
<!-- the Enhance button of an AI photo tool, made of frosted glass over two slow colours. On hover a comet of light
runs around its edge and a soft light follows the pointer inside the glass; pressed, the comet stops being a
lap and becomes the progress: it traces the edge from the top, as far as the job has gone, with the
percentage beside it. At 100% the edge closes, flashes once, a reflection crosses the glass and the button
says Enhanced with a check that draws itself -->
<div class="eb" data-wrap>
<span class="eb__spill" data-spill aria-hidden="true"></span>
<button class="eb__btn" type="button" data-btn aria-label="Enhance photo, uses 2 credits">
<span class="eb__glass" data-glass>
<span class="eb__tint" aria-hidden="true">
<span class="eb__blob eb__blob--a" data-blob></span>
<span class="eb__blob eb__blob--b" data-blob></span>
</span>
<span class="eb__frost" aria-hidden="true"></span>
<span class="eb__shine" data-shine aria-hidden="true"></span>
<span class="eb__sweep" aria-hidden="true"><span class="eb__sweep-band" data-sweep></span></span>
<svg class="eb__edge" data-edge aria-hidden="true">
<defs>
<linearGradient id="eb-grad" data-grad gradientUnits="userSpaceOnUse" x1="0" y1="0" x2="240" y2="0">
<stop offset="0" stop-color="var(--violet)"/>
<stop offset="0.5" stop-color="var(--cyan)"/>
<stop offset="1" stop-color="var(--violet)"/>
</linearGradient>
<filter id="eb-blur" data-filter filterUnits="userSpaceOnUse" x="-40" y="-40" width="320" height="140">
<feGaussianBlur stdDeviation="3.6"/>
</filter>
</defs>
<path class="eb__track" data-track/>
<g class="eb__glow" data-glow filter="url(#eb-blur)"></g>
<path class="eb__done" data-done/>
<g class="eb__comet" data-comet></g>
</svg>
<span class="eb__row">
<span class="eb__icon" aria-hidden="true">
<svg viewBox="0 0 24 24">
<g data-spark>
<path class="eb__spark" d="M12 3.2c.5 4.3 2.5 6.3 6.8 6.8-4.3.5-6.3 2.5-6.8 6.8-.5-4.3-2.5-6.3-6.8-6.8 4.3-.5 6.3-2.5 6.8-6.8z"/>
<path class="eb__spark eb__spark--s" data-spark-s d="M18.6 14.6c.2 1.7 1 2.5 2.7 2.7-1.7.2-2.5 1-2.7 2.7-.2-1.7-1-2.5-2.7-2.7 1.7-.2 2.5-1 2.7-2.7z"/>
</g>
<path class="eb__check" data-check pathLength="1" d="M5.6 12.6l4.1 4.1 8.6-9.2"/>
</svg>
</span>
<span class="eb__labels" aria-hidden="true">
<span class="eb__label" data-label>Enhance</span>
<span class="eb__label eb__label--busy" data-label>Enhancing</span>
<span class="eb__label" data-label>Enhanced</span>
</span>
<span class="eb__chip" aria-hidden="true">
<span class="eb__chip-face" data-chip>2 cr</span>
<span class="eb__chip-face" data-chip><span data-pct>0</span>%</span>
<span class="eb__chip-face" data-chip>4K</span>
</span>
</span>
</span>
</button>
</div>
<p class="sr" aria-live="polite" data-live></p>
</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.
27 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 Enhance button” from Animorio and fit it into my siteThe button is a single box with three absolute layers: at the bottom two colour patches blurred with filter: blur, which GSAP drifts back and forth with xPercent; above them a pane with backdrop-filter, a gradient from the top, a feTurbulence grain in an SVG used as background image and three inner shadows (the one pixel edge, the light at the top, the shadow at the bottom); on top a radial-gradient that follows the pointer through two CSS variables moved by gsap.quickTo.
One pill shaped SVG path that starts at the top centre and runs clockwise, rebuilt on every resize by a ResizeObserver; getTotalLength gives its length L. The same path is the track, the progress, the glow and the comet: only strokeDasharray and strokeDashoffset change.
The tail is fourteen copies of the path, each a dash one fourteenth of the tail long and more transparent going back, plus a short white head; a thicker copy of each slice goes through a feGaussianBlur and is the glow. With a dash of len and a gap of L minus len, the offset modulo L carries the comet past the start without a jump.
On click the comet fades out in 0.16 seconds, starts again from zero with a short tail and from then on its head is the job’s value: a GSAP timeline in four stretches (fast to 34, calmer to 71, almost still to 77, power3.in to 100) moves the head, the progress and the percentage together. While loading the tail is clipped at zero, so it never goes back past the start.
At 100 the comet shortens to nothing, the progress becomes a full ring (dasharray none), the glow rises to 1 in 0.14 seconds and settles at a fifth; the glass goes to 1.018 and comes back on an elastic spring, a slanted band of light crosses it with xPercent, the sparkle folds with scale and the check draws itself with pathLength 1 and strokeDashoffset.
| Name | File | Default | What it changes |
|---|---|---|---|
LABEL_REST | script.js | Enhance | The word at rest. |
LABEL_BUSY | script.js | Enhancing | The word while the job runs. |
LABEL_DONE | script.js | Enhanced | The word at the end. |
COST | script.js | 2 cr | The capsule at rest: what the job costs. |
RESULT | script.js | 4K | The capsule at the end: what came out. |
DURATION | script.js | 2.9 | How many seconds the job takes, from 0 to 100. |
LAP | script.js | 1.9 | How many seconds one lap of the comet takes on hover. |
TAIL | script.js | 0.26 | How long the comet’s tail is, as a share of the edge. |
GLOW | script.js | 1 | How strong the glow on the edge is. |
SPRING | script.js | 1 | How springy the press is: 0.4 calm, 2 very bouncy. |
HOLD | script.js | 1.6 | How many seconds Enhanced stays before going back to rest. |
AUTO | script.js | true | The button goes round by itself until someone touches it. |
For the main action of an AI app that works for a few seconds: enhancing or upscaling a photo, generating an image, summarising a document. The edge filling up tells how far it has gone without an extra bar, and the button stays the place to look.
On the phone the button is at most 80% of the screen wide and the edge redraws to its size; there is no hover, so the light under the finger turns on at the touch and the rest, progress included, is the same.
Nothing moves: the colours under the glass stay still, there is no comet, the edge fades in as the percentage rises, the words and the capsule swap in place and the check fades in.
GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 8.6 KB; the libraries: GSAP 28 KB.
Tested on 1 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.