
The elastic button
Buttons, Hover, Text
The daily mini sudoku, six by six, really playable: the chosen square takes a ring that glides from one to the next and lights its row, its column and its box, along with every matching number. A right number lands on a bounce; a wrong one turns red, shakes the square and lights the ones that contradict it. Every full row, column or box does a wave, and on the last number the wave takes the whole grid, the clock stops and ticks itself off.
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>
<!--
"Mini sudoku" 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>Mini sudoku</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 daily mini sudoku, six by six: the chosen square lights its row, column and box,
a wrong number shakes, a full line does the wave and the last number solves it -->
<section class="sd" data-sd aria-label="Mini sudoku">
<header class="sd__top">
<span class="sd__title"><span class="sd__name"><span data-outname>Mini sudoku</span></span><span class="sd__status" data-outstatus>8 squares to go</span></span>
<span class="sd__time" data-time><svg viewBox="0 0 14 14" aria-hidden="true"><circle cx="7" cy="7" r="5.200"></circle><path class="sd__hand" d="M7 4.200V7l1.900 1.300"></path><path class="sd__tick" pathLength="1" d="M4.300 7.200 6.200 9l3.600-4"></path></svg><b data-outtime>0:00</b></span>
</header>
<div class="sd__board" data-board>
<div class="sd__box">
<button class="sd__cell" type="button" data-cell data-i="0" data-given tabindex="-1" aria-label="Row 1, column 1, 5, given"><b>5</b></button>
<button class="sd__cell" type="button" data-cell data-i="1" tabindex="-1" aria-label="Row 1, column 2, empty"><b></b></button>
<button class="sd__cell" type="button" data-cell data-i="2" data-given tabindex="-1" aria-label="Row 1, column 3, 3, given"><b>3</b></button>
<button class="sd__cell" type="button" data-cell data-i="6" data-given tabindex="-1" aria-label="Row 2, column 1, 1, given"><b>1</b></button>
<button class="sd__cell" type="button" data-cell data-i="7" data-given tabindex="-1" aria-label="Row 2, column 2, 6, given"><b>6</b></button>
<button class="sd__cell" type="button" data-cell data-i="8" data-given tabindex="-1" aria-label="Row 2, column 3, 4, given"><b>4</b></button>
</div>
<div class="sd__box">
<button class="sd__cell" type="button" data-cell data-i="3" data-given tabindex="-1" aria-label="Row 1, column 4, 4, given"><b>4</b></button>
<button class="sd__cell" type="button" data-cell data-i="4" tabindex="-1" aria-label="Row 1, column 5, empty"><b></b></button>
<button class="sd__cell" type="button" data-cell data-i="5" data-given tabindex="-1" aria-label="Row 1, column 6, 6, given"><b>6</b></button>
<button class="sd__cell" type="button" data-cell data-i="9" tabindex="-1" aria-label="Row 2, column 4, empty"><b></b></button>
<button class="sd__cell" type="button" data-cell data-i="10" data-given tabindex="-1" aria-label="Row 2, column 5, 5, given"><b>5</b></button>
<button class="sd__cell" type="button" data-cell data-i="11" data-given tabindex="-1" aria-label="Row 2, column 6, 2, given"><b>2</b></button>
</div>
<div class="sd__box">
<button class="sd__cell" type="button" data-cell data-i="12" tabindex="-1" aria-label="Row 3, column 1, empty"><b></b></button>
<button class="sd__cell" type="button" data-cell data-i="13" data-given tabindex="-1" aria-label="Row 3, column 2, 1, given"><b>1</b></button>
<button class="sd__cell" type="button" data-cell data-i="14" tabindex="-1" aria-label="Row 3, column 3, empty"><b></b></button>
<button class="sd__cell" type="button" data-cell data-i="18" data-given tabindex="-1" aria-label="Row 4, column 1, 3, given"><b>3</b></button>
<button class="sd__cell" type="button" data-cell data-i="19" tabindex="-1" aria-label="Row 4, column 2, empty"><b></b></button>
<button class="sd__cell" type="button" data-cell data-i="20" data-given tabindex="-1" aria-label="Row 4, column 3, 2, given"><b>2</b></button>
</div>
<div class="sd__box">
<button class="sd__cell" type="button" data-cell data-i="15" data-given tabindex="-1" aria-label="Row 3, column 4, 2, given"><b>2</b></button>
<button class="sd__cell" type="button" data-cell data-i="16" data-given tabindex="-1" aria-label="Row 3, column 5, 3, given"><b>3</b></button>
<button class="sd__cell" type="button" data-cell data-i="17" data-given tabindex="-1" aria-label="Row 3, column 6, 5, given"><b>5</b></button>
<button class="sd__cell" type="button" data-cell data-i="21" data-given tabindex="-1" aria-label="Row 4, column 4, 6, given"><b>6</b></button>
<button class="sd__cell" type="button" data-cell data-i="22" data-given tabindex="-1" aria-label="Row 4, column 5, 4, given"><b>4</b></button>
<button class="sd__cell" type="button" data-cell data-i="23" data-given tabindex="-1" aria-label="Row 4, column 6, 1, given"><b>1</b></button>
</div>
<div class="sd__box">
<button class="sd__cell" type="button" data-cell data-i="24" data-given tabindex="-1" aria-label="Row 5, column 1, 6, given"><b>6</b></button>
<button class="sd__cell" type="button" data-cell data-i="25" tabindex="-1" aria-label="Row 5, column 2, empty"><b></b></button>
<button class="sd__cell" type="button" data-cell data-i="26" data-given tabindex="-1" aria-label="Row 5, column 3, 1, given"><b>1</b></button>
<button class="sd__cell" type="button" data-cell data-i="30" data-given tabindex="-1" aria-label="Row 6, column 1, 2, given"><b>2</b></button>
<button class="sd__cell" type="button" data-cell data-i="31" data-given tabindex="-1" aria-label="Row 6, column 2, 3, given"><b>3</b></button>
<button class="sd__cell" type="button" data-cell data-i="32" data-given tabindex="-1" aria-label="Row 6, column 3, 5, given"><b>5</b></button>
</div>
<div class="sd__box">
<button class="sd__cell" type="button" data-cell data-i="27" data-given tabindex="-1" aria-label="Row 5, column 4, 5, given"><b>5</b></button>
<button class="sd__cell" type="button" data-cell data-i="28" data-given tabindex="-1" aria-label="Row 5, column 5, 2, given"><b>2</b></button>
<button class="sd__cell" type="button" data-cell data-i="29" data-given tabindex="-1" aria-label="Row 5, column 6, 3, given"><b>3</b></button>
<button class="sd__cell" type="button" data-cell data-i="33" data-given tabindex="-1" aria-label="Row 6, column 4, 1, given"><b>1</b></button>
<button class="sd__cell" type="button" data-cell data-i="34" tabindex="-1" aria-label="Row 6, column 5, empty"><b></b></button>
<button class="sd__cell" type="button" data-cell data-i="35" data-given tabindex="-1" aria-label="Row 6, column 6, 4, given"><b>4</b></button>
</div>
<span class="sd__ring" data-ring aria-hidden="true"></span>
</div>
<div class="sd__pad" data-pad>
<button class="sd__key" type="button" data-key="1" aria-label="Enter 1"><b>1</b></button>
<button class="sd__key" type="button" data-key="2" aria-label="Enter 2"><b>2</b></button>
<button class="sd__key" type="button" data-key="3" aria-label="Enter 3"><b>3</b></button>
<button class="sd__key" type="button" data-key="4" aria-label="Enter 4"><b>4</b></button>
<button class="sd__key" type="button" data-key="5" aria-label="Enter 5"><b>5</b></button>
<button class="sd__key" type="button" data-key="6" aria-label="Enter 6"><b>6</b></button>
<button class="sd__key sd__key--erase" type="button" data-key="0" aria-label="Erase"><svg viewBox="0 0 20 16" aria-hidden="true"><path d="M7 1.500h10.500a1.500 1.500 0 0 1 1.500 1.500v10a1.500 1.500 0 0 1-1.500 1.500H7L1.200 8Z"></path><path d="m10 5.500 5 5m0-5-5 5"></path></svg></button>
<button class="sd__again" type="button" data-again tabindex="-1"><span>Play again</span></button>
</div>
</section>
<span class="live" aria-live="polite" data-live></span>
<svg class="ghost" data-ghost viewBox="0 0 24 24" aria-hidden="true"><path d="M5 3.200 19.200 11l-6.300 1.600-3.300 5.900Z"></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>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.
48 values to change
Works with Claude, Claude Code, ChatGPT, Cursor, VS Code, Windsurf, Codex, Gemini CLI
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 “Mini sudoku” from Animorio and fit it into my siteThe solution is a string of 36 digits at the top of the script; the squares without data-given are the ones to fill. A square’s row, column and box come from its index, and the eighteen units (six rows, six columns, six boxes) are lists of six indexes.
The ring is a single element, laid by GSAP on the measurements of the chosen square: it travels from one to the next on a spring. The lights are attributes on the squares (chosen, peer, same, wrong) that CSS colours: the script writes no colour.
On every number the square is compared with the solution. If it is wrong it shakes and the peers holding the same number are found and lit. If it is right the units containing it are checked: the ones that are all right do the wave, each square delayed by its distance.
| Name | File | Default | What it changes |
|---|---|---|---|
ACCENT | script.js | #4b5bf0 | The colour of the ring, the player’s numbers and the lights. |
GLIDE | script.js | 0.4 | How long the ring takes to glide from one square to the next. |
SPRING | script.js | 1 | How much the numbers, the keys and the wave bounce. |
On the games page of a newspaper or an app, as the daily game next to the crossword; on a waiting page, a 404, a newsletter that wants readers back every morning. The same grid carries a nine-by-nine sudoku by changing the string and the sizes.
The card is at most 276 pixels wide and about 365 tall: it fits any phone screen. The squares are 39 by 38 pixels and the keys 36 tall: easy to hit with a thumb, and nothing depends on hover.
The ring does not glide: it is on the chosen square at once. The numbers appear in place without spinning, with no shakes or waves; a mistake reads from the red and the count, the end from the title and the clock. The demo’s pointer does not start.
GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 7.8 KB; the libraries: GSAP 28 KB.
Tested on 27 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.
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.