
Speeding marquee
Scroll, Text, Hover
Square buttons where a brushstroke of ink enters from the side you come from and leaves by the side you go, and the text changes colour right on the brushstroke’s edge.
Rebuilt from scratch studying champohaircare.com by BAO: the idea is theirs; code, copy and images are ours. Read how it’s made
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>
<!--
"Ink on the 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="it">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>L’inchiostro sul bottone</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fontsource-variable/mona-sans@5.3.0/standard.css">
<link rel="stylesheet" href="style.css">
</head>
<body>
<main class="banco">
<p class="nota" data-nota>Passa sopra i bottoni: l’inchiostro entra dal lato da cui arrivi ed esce da quello da cui te ne vai.</p>
<section class="invito">
<h1 class="invito__titolo">Stampiamo a mano, una pagina alla volta.</h1>
<p class="invito__testo">Carta di cotone, caratteri di piombo e un torchio del 1932. Raccontaci cosa ti serve.</p>
<div class="invito__bottoni">
<a class="bottone bottone--pieno bottone--grande" href="#" data-bottone><span class="bottone__testo">Chiedi un preventivo<svg class="bottone__freccia" viewBox="0 0 16 16" aria-hidden="true" focusable="false"><path d="M2.5 8h10.5M9 4l4 4-4 4" fill="none" stroke="currentColor" stroke-width="1.7" stroke-linecap="round" stroke-linejoin="round"/></svg></span><span class="bottone__inchiostro" aria-hidden="true"><span class="bottone__testo">Chiedi un preventivo<svg class="bottone__freccia" viewBox="0 0 16 16" aria-hidden="true" focusable="false"><path d="M2.5 8h10.5M9 4l4 4-4 4" fill="none" stroke="currentColor" stroke-width="1.7" stroke-linecap="round" stroke-linejoin="round"/></svg></span></span></a>
<a class="bottone bottone--vuoto bottone--grande" href="#" data-bottone><span class="bottone__testo">Guarda i lavori</span><span class="bottone__inchiostro" aria-hidden="true"><span class="bottone__testo">Guarda i lavori</span></span></a>
</div>
<p class="invito__etichetta">Cosa stampiamo</p>
<div class="invito__cartellini">
<a class="bottone bottone--cartellino" href="#" data-bottone><span class="bottone__testo">Biglietti</span><span class="bottone__inchiostro" aria-hidden="true"><span class="bottone__testo">Biglietti</span></span></a><a class="bottone bottone--cartellino" href="#" data-bottone><span class="bottone__testo">Inviti</span><span class="bottone__inchiostro" aria-hidden="true"><span class="bottone__testo">Inviti</span></span></a><a class="bottone bottone--cartellino" href="#" data-bottone><span class="bottone__testo">Etichette</span><span class="bottone__inchiostro" aria-hidden="true"><span class="bottone__testo">Etichette</span></span></a><a class="bottone bottone--cartellino" href="#" data-bottone><span class="bottone__testo">Manifesti</span><span class="bottone__inchiostro" aria-hidden="true"><span class="bottone__testo">Manifesti</span></span></a><a class="bottone bottone--cartellino" href="#" data-bottone><span class="bottone__testo">Menù</span><span class="bottone__inchiostro" aria-hidden="true"><span class="bottone__testo">Menù</span></span></a>
</div>
</section>
</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.
28 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 “Ink on the button” from Animorio and fit it into my siteInside each button there is a second copy, position absolute on top of the first, with the inked colours and the same text in the same place. Cutting the copy reveals the ink, and the text below and the text above meet on the cut: the colour splits right there, with no blending tricks.
The cut is a clip-path polygon going from var(--da) to var(--a), with nine points per side nudged a few pixels back and forth: the edge looks like a brush’s. At rest both edges sit outside, at −12%; entering from the left --a runs to 112%, entering from the right --da runs to −12%.
A single pointermove listener on the window checks which button is under the pointer: when it changes, it leaves the old one and enters the new one, and the side is the half of the button where the pointer is at that moment. Leaving to the right moves the left edge, leaving to the left moves the right one.
GSAP animates the two CSS variables: entering takes 0.45 seconds in power3.out, leaving 0.38 in power2.inOut. If the band is not empty when you come back, it does not restart from the edge: both variables go on from where they are, and the brushstroke turns back without jumps.
| Name | File | Default | What it changes |
|---|---|---|---|
ENTRA, ESCE | script.js | 0.45, 0.38 | The seconds to cover and to uncover the button. |
--inchiostro-fondo, --inchiostro-testo | style.css | per variante | The colours of the ink and of the inked text for each variant (filled, empty, tag). |
clip-path | style.css | 9 punti per lato | The brushstroke’s edge: more points and larger offsets, a rougher brush. |
For the main buttons of a site that wants a hand-made touch: workshops, print shops, restaurants, studios. It works with any text and any colour.
Tapping a button, the ink enters from the finger’s side and after a moment leaves to the right: the gesture remains, even without a hovering mouse.
No running brushstroke: the ink appears and disappears in place with a 150-millisecond fade.
GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 3.9 KB; the libraries: GSAP 28 KB.
Tested on 27 September 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.