Skip to content
animorio
IT
All components

Fix with AI button

Buttons, HoverGSAP, CSS onlyMediumCompressed weight: Demo 8.5 KBGSAP 28 KBFreeDownload the zip

The Fix with AI button of Nimbic, a made-up AI code editor: a graphite pill on white, with a coral chip on the left holding a warning triangle and the error count, and the file name below. On the tap a wave of liquid metal, chrome with a lilac glint, sweeps back and forth through the pill with rippling edges while the 1px rim catches the light where it passes: every time it crosses the chip an error goes, the count rolls down and the coral walks towards mint, while the Fixing label shimmers. On the last pass the metal floods the pill and drains away through the bottom, leaving Fixed 3 issues with a green chip and a drawn tick, and below it the lines added and removed. Then it goes back to rest by itself.

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>
<!--
  "Fix with AI 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 Fix with AI button with the liquid metal wave that clears the errors</title>
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fontsource-variable/mona-sans@5.3.0/wdth.css">
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fontsource-variable/jetbrains-mono@5.3.0/index.css">
  <link rel="stylesheet" href="style.css">
</head>
<body>
  <main class="stage">
    <!-- one gesture: fix the errors. Pressed, a wave of liquid metal crosses the pill once for every error,
         its edges rippling and the 1px rim catching the light where it passes; the counter rolls down,
         the last pass floods the pill and drains away, leaving it fixed -->
    <div class="frame" data-wrap>
      <button class="f" type="button" data-btn data-autoclic aria-describedby="f-note">
        <span class="f__skin" aria-hidden="true"></span>
        <span class="f__grain" aria-hidden="true"></span>
        <span class="f__glow" data-glow aria-hidden="true"></span>
        <svg class="f__metal" data-metal aria-hidden="true">
          <defs>
            <linearGradient id="f-chrome" data-chrome gradientUnits="userSpaceOnUse" x1="0" y1="0" x2="100" y2="0">
              <stop offset="0" stop-color="#7d8496" stop-opacity="0"></stop>
              <stop offset="0.16" stop-color="#8f97ab" stop-opacity="0.55"></stop>
              <stop offset="0.34" stop-color="#eef1f8"></stop>
              <stop offset="0.46" stop-color="#9aa2b8"></stop>
              <stop offset="0.58" stop-color="#ffffff"></stop>
              <stop offset="0.72" stop-color="#b9c4ff"></stop>
              <stop offset="0.86" stop-color="#d9c8ff" stop-opacity="0.6"></stop>
              <stop offset="1" stop-color="#7d8496" stop-opacity="0"></stop>
            </linearGradient>
            <linearGradient id="f-pool" data-pool gradientUnits="userSpaceOnUse" x1="0" y1="0" x2="0" y2="60">
              <stop offset="0" stop-color="#ffffff"></stop>
              <stop offset="0.12" stop-color="#d7dcea"></stop>
              <stop offset="0.45" stop-color="#8d94a8"></stop>
              <stop offset="0.7" stop-color="#c3cbf2"></stop>
              <stop offset="1" stop-color="#6c7286"></stop>
            </linearGradient>
            <linearGradient id="f-rim" data-rim gradientUnits="userSpaceOnUse" x1="0" y1="0" x2="100" y2="0">
              <stop offset="0" stop-color="#ffffff" stop-opacity="0"></stop>
              <stop offset="0.5" stop-color="#ffffff" stop-opacity="1"></stop>
              <stop offset="1" stop-color="#ffffff" stop-opacity="0"></stop>
            </linearGradient>
            <filter id="f-soft" x="-20%" y="-60%" width="140%" height="220%"><feGaussianBlur stdDeviation="5"></feGaussianBlur></filter>
            <clipPath id="f-clip"><rect data-cliprect x="0" y="0" width="100" height="60" rx="30"></rect></clipPath>
          </defs>
          <g clip-path="url(#f-clip)">
            <path class="f__halo" data-halo fill="url(#f-chrome)" filter="url(#f-soft)"></path>
            <path class="f__band" data-band fill="url(#f-chrome)"></path>
            <path class="f__crest" data-crest fill="none" stroke="#ffffff"></path>
            <path class="f__drain" data-drain fill="url(#f-pool)"></path>
          </g>
          <rect class="f__rim" data-rimrect x="0.5" y="0.5" width="99" height="59" rx="29.5" fill="none" stroke="url(#f-rim)"></rect>
        </svg>

        <span class="f__chip" data-chip aria-hidden="true">
          <span class="f__chip-bg" data-chipbg></span>
          <svg class="f__warn" data-warn viewBox="0 0 16 16"><path d="M8 2.6 14 13H2Z"></path><path class="f__warn-mark" d="M8 6.6v2.9M8 11.2v.1"></path></svg>
          <svg class="f__tick" data-tick viewBox="0 0 16 16"><path data-tickpath d="M3.6 8.4 6.7 11.3 12.4 4.9"></path></svg>
          <span class="f__count" data-count><span class="f__roll" data-roll></span></span>
        </span>

        <span class="f__labels" data-labels>
          <span class="f__label" data-l="idle">Fix with AI</span>
          <span class="f__label f__label--wait" data-l="wait">Fixing<span class="f__dots" data-dots>&nbsp;<span>.</span><span>.</span><span>.</span></span></span>
          <span class="f__label" data-l="done">Fixed&nbsp;<span data-fixednum>3</span>&nbsp;issues</span>
        </span>
      </button>

      <p class="note" id="f-note" data-note aria-live="polite">
        <span class="note__file">checkout.ts</span><span class="note__sep">·</span><span class="note__state" data-notestate><span data-n>3</span> type errors</span>
      </p>
    </div>
  </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.

27 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 “Fix with AI button” 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 white ground sits the graphite Fix with AI pill, with a fine grain and a top edge that catches the light; on the left the coral chip with a warning triangle and the 3, and below, in a code font, checkout.ts · 3 type errors. On hover a cool light follows the pointer and the 1px rim lights up under it; pressed, the pill squashes slightly. On the tap the label rolls to Fixing, with a light running through the letters and three dots rising in turn, and a wave of liquid metal comes in from the left: a band of chrome and lilac with rippling edges, a white crest on its front and a soft halo, leaning into its direction like a pushed liquid. It crosses the pill and comes back, once per error, and the rim catches the light where it passes. Every time it crosses the chip the count rolls down, the triangle twitches and the coral walks towards green. On the last pass the metal spreads and floods the pill, which swells a hair, then drains away through the bottom with a rippling surface: Fixed 3 issues is left, the chip becomes a round mint badge with a tick that draws itself and below comes +12 −4 · 0 errors. Soon it goes back to rest by itself; a tap on Fixed brings it back at once.

How it works

Metal redrawn on every frame

Inside the pill there is an SVG the same size, clipped to its shape. The GSAP ticker redraws the band as a polygon: each of its two edges is thirteen points, moved by two sines with different phases and speeds, and leaned in proportion to the band’s speed, so the liquid bends the way it goes. The same shape, blurred, makes the halo.

Chrome that follows the wave

The fill is a linearGradient in pill coordinates with eight stops between grey, white, silver and lilac: on every frame its x1 and x2 are put at the sides of the band and swapped when it comes back, so the brightest side is always the front. The band uses mix-blend-mode screen, so it lightens the graphite without hiding the label.

The rim that catches the light

A 1px rounded rectangle is stroked with a white gradient that fades at the sides: its centre goes where the band is, or where the pointer is on hover, and its opacity follows the metal.

One error per pass

The errors are not counted on a timer: on every frame the script checks whether the band’s centre has crossed from one side of the chip to the other. When it does, the count, a column of digits, moves up one row on a spring and the chip colour is interpolated between coral and mint.

The metal that drains away

At the end the band spreads past the pill and a pool with a rippling surface takes its place (seventeen points and two sines): its level falls below the pill with power2.in, like a falling liquid, while the label rolls to Fixed and the tick draws itself with strokeDashoffset.

Values to change

NameFileDefaultWhat it changes
ERRORSscript.js3How many errors the wave fixes: it passes once for each.
PASSscript.js0.95The seconds of each pass of the wave.
WAVEscript.js1How much the edges of the metal ripple.
WIDTHscript.js0.34How wide the wave is compared with the pill.
BOUNCEscript.js1.5How much the pill, the labels and the chip bounce.
HOLDscript.js2.6The seconds the pill stays on Fixed before going back.
ADDEDscript.js12The added lines written below at the end.
REMOVEDscript.js4The removed lines written below at the end.
--errorestyle.css#ff7a62The coral of the error chip.
--fattostyle.css#7fe0b4The mint green of the chip once fixed.

Try them in the Playground

When to use it

In a code editor, a code review, an error panel or any AI app that fixes something by itself (text, spreadsheets, forms): the chip says how many problems there are and the wave shows them being taken one by one.

On phones

The pill drops to 56 pixels and the label tightens by a point; the finger taps like the mouse. Without hover the light under the pointer stays off; the wave and the rim catching light stay the same.

With reduced motion

No wave and no draining metal: the label changes with a fade, the count steps down with a colour change, and at the end the chip and the tick fade in.

Pitfalls

  • The back edge of the band ended exactly where the gradient was still full and cut the metal with a hard line: now the polygon goes past the end of the gradient, so the front stays sharp with its crest and the tail fades.
  • Counting the errors on a timer made them vanish before the wave reached the chip when PASS changes: they are counted when the band’s centre crosses the chip.
  • The preview’s automatic click comes every 2.8 seconds and closed Fixed before it could be read: only a real click (isTrusted) closes it early.
  • The line below is rewritten at the end with +12 −4: the error number is no longer there and the reset looked for it and stopped on an error; now it is looked up each time and skipped when missing.

Libraries

GSAP 3.15.0, Mona Sans (font variabile) 5.3.0, JetBrains Mono (font variabile) 5.3.0.

Compressed with gzip, the three demo files weigh 8.5 KB; the libraries: GSAP 28 KB.

Testing

Tested on 16 November 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