
Ink that reveals
WebGL, Hover
The voice mode of a made-up AI assistant, Halcy, on a near black card: a ribbon of light made of five thin strands crosses the card and runs through a big glass button that magnifies it like a lens. Tap the button and you talk: the ribbon swells and ripples with the loudness of the voice (a made-up voice built from syllables in the code: nothing is recorded) and the words land in the caption as they are said. Then the strands gather into a ring inside the glass while the assistant thinks, and open again, warmer, peach and rose, while it answers. The ribbon leans toward the pointer. All in one WebGL shader on a flat rectangle, with three CSS bands if WebGL is missing.
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>
<!--
"Voice mode 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 voice mode button with a ribbon of light that follows the voice</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 voice mode of a made-up AI assistant, Halcy. A ribbon of light made of five strands runs across the card and
through the big glass button; it swells and ripples with the voice (made up, never recorded), gathers into a
ring while the assistant thinks, warms up while it answers, and bends toward the pointer -->
<section class="card" data-card aria-label="Halcy voice mode">
<canvas class="card__gl" data-gl aria-hidden="true"></canvas>
<div class="card__fallback" aria-hidden="true"><span></span><span></span><span></span></div>
<span class="card__sheen" aria-hidden="true"></span>
<header class="top">
<span class="brand">
<svg class="brand__mark" viewBox="0 0 20 20" aria-hidden="true">
<path d="M3 10c2.2-4.2 4.4-4.2 6.6 0s4.4 4.2 7.4 0" />
<path class="brand__faint" d="M3 13.4c2.2-2.6 4.4-2.6 6.6 0s4.4 2.6 7.4 0" />
</svg>
<span class="brand__name">Halcy</span>
</span>
<span class="state" data-state>
<span class="state__words">
<span class="state__word" data-word>Voice</span>
</span>
<span class="state__time" data-time>0:00</span>
</span>
</header>
<div class="core">
<button class="talk" type="button" data-talk aria-label="Start talking">
<span class="talk__rim" aria-hidden="true"></span>
<span class="talk__glint" aria-hidden="true"></span>
<svg class="talk__mic" data-mic viewBox="0 0 24 24" aria-hidden="true">
<rect x="9" y="3.2" width="6" height="11" rx="3" />
<path d="M5.6 11.4a6.4 6.4 0 0 0 12.8 0" />
<path d="M12 17.8v3" />
</svg>
</button>
</div>
<div class="caption" data-caption aria-live="polite">
<p class="caption__who" data-who>Tap to talk</p>
<p class="caption__line" data-line></p>
</div>
<footer class="tools">
<button class="tool" type="button" aria-label="Mute" data-mute>
<svg viewBox="0 0 24 24" aria-hidden="true">
<rect x="9" y="3.2" width="6" height="11" rx="3" />
<path d="M5.6 11.4a6.4 6.4 0 0 0 12.8 0" />
<path d="M12 17.8v3" />
<path class="tool__slash" d="M4.5 4.5l15 15" />
</svg>
</button>
<span class="tools__hint" data-hint>Halcy can make mistakes. Check what matters.</span>
<button class="tool tool--end" type="button" aria-label="End voice mode" data-end>
<svg viewBox="0 0 24 24" aria-hidden="true"><path d="M7 7l10 10M17 7L7 17" /></svg>
</button>
</footer>
</section>
<svg class="ghost" data-ghost viewBox="0 0 24 24" aria-hidden="true">
<path d="M5 3.5 18.5 12 12.4 13.6 9.4 19.6z" />
</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.
23 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 “Voice mode button” from Animorio and fit it into my siteThe canvas covers the whole card and draws one triangle as big as the screen: everything else happens in the fragment shader, pixel by pixel. The canvas stays under 600 thousand pixels even on dense screens, because the light is soft and more only costs more.
Each strand is a sum of three sines with their own frequency and speed, times a bell that keeps it tall in the middle and flat toward the edges. For every pixel the shader measures how far it is from each strand and adds a thin core and a wide halo; the middle strand counts double. The sum goes through 1 − exp(−light), so crossing strands brighten without burning out.
Inside the button's circle the coordinates are pulled toward the centre, more in the middle and not at all at the edge: the ribbon behind the glass looks bigger. The light inside is 40% stronger. The button's centre and radius are measured without the scale GSAP puts on it when it is pressed.
Each sentence is split into words and each word into syllables, one every three letters, each a little different in length and loudness; after a comma or a full stop there is a longer pause. The loudness at any moment is the sum of small curves that rise in 5 hundredths of a second and fall in 11. The ribbon follows it fast going up and slower coming down, and each word of the caption lights up at the moment it starts.
One GSAP timeline runs the conversation: listening, thinking, answering, back to rest. While it thinks the strands fade and a ring is born at 60% of the radius, with light running around it; the colours of the four moments slide from one pair to the next.
| Name | File | Default | What it changes |
|---|---|---|---|
SPEED | script.js | 1 | How fast the strands ripple (0 holds them still). |
SWELL | script.js | 1 | How much the ribbon swells with the voice. |
THICKNESS | script.js | 1 | How thick the strands of light are. |
GLOW | script.js | 1 | How wide the soft glow around the strands is. |
LENS | script.js | 1 | How much the glass button magnifies the ribbon behind it (0 is flat glass). |
BEND | script.js | 1 | How much the ribbon leans toward the pointer (0 ignores it). |
THINK_FOR | script.js | 1.5 | Seconds the assistant thinks, with the strands gathered into a ring. |
AUTO_PILOT | script.js | 1.2 | Seconds before the drawn pointer starts a conversation (0 never). |
For the voice mode of an AI assistant, a booking app, a guide or a voice customer service: wherever the speaker needs to see at a glance that the app is listening, when it is thinking and when it answers.
The same animation with adapted sizes: the card takes almost the whole width and height, the button is sized on the shorter side of the screen, the line at the bottom hides when the height is short. The ribbon leans toward the finger while it rests on the card.
The ribbon stands still, half open, and does not bend; no squash and no movement. The conversation still plays: the colours change with a fade, the thinking ring appears and goes, the caption words fade in.
GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 9.9 KB; the libraries: GSAP 28 KB.
Tested on 8 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.