
The elastic button
Buttons, Hover, Text
A class gradebook in a school app: four students, three assignments and each one’s average with its bar. Tapping a grade lands a ring on the cell on a spring, and with the minus and plus keys the grade rolls, the row’s average rolls with it, the bar moves and changes colour below the pass mark, and the class average updates at the top.
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>
<!--
"Gradebook table" 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>Gradebook table</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 gradebook of a class in a school app: pick a cell, correct the grade with minus and plus,
and the row's average rolls while its bar moves; the class average follows -->
<section class="gb" data-gb aria-label="Gradebook">
<header class="gb__head"><span class="gb__title"><strong>Biology, class 3B</strong><span>Autumn term</span></span><span class="gb__class">Class average <span class="gb__roll"><b data-outclass>0</b></span></span></header>
<div class="gb__table" role="grid" aria-label="Grades" data-table>
<i class="gb__ring" data-ring aria-hidden="true"></i>
<div class="gb__row gb__row--head" role="row"><span role="columnheader">Student</span><span role="columnheader">Essay</span><span role="columnheader">Quiz</span><span role="columnheader">Lab</span><span role="columnheader">Average</span></div>
<div class="gb__row" role="row" data-row data-name="Ada Lindqvist" data-grades="88,92,85"></div>
<div class="gb__row" role="row" data-row data-name="Mira Okafor" data-grades="74,62,81"></div>
<div class="gb__row" role="row" data-row data-name="Tomas Reyes" data-grades="91,84,96"></div>
<div class="gb__row" role="row" data-row data-name="Jun Hayashi" data-grades="67,79,58"></div>
</div>
<footer class="gb__edit" data-edit>
<span class="gb__who"><span data-outwho>Pick a grade to correct it</span></span>
<span class="gb__step"><button type="button" data-step="-1" aria-label="Lower the grade" disabled><svg viewBox="0 0 12 12" aria-hidden="true"><path d="M2.500 6h7"></path></svg></button><button type="button" data-step="1" aria-label="Raise the grade" disabled><svg viewBox="0 0 12 12" aria-hidden="true"><path d="M2.500 6h7M6 2.500v7"></path></svg></button></span>
</footer>
</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.
20 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 “Gradebook table” from Animorio and fit it into my siteEvery row has only the name and the grades in the HTML. The script writes the cells as buttons, the bar and the average: changing the class takes changing two attributes.
The ring of the chosen cell is one element inside the table. Its place is read from the cell itself and GSAP takes it there on a spring; when the window changes size it is put back in place.
On every change the row’s average and the class average are worked out again. Only the numbers that really change roll, up or down according to direction, and the bar follows on a spring.
| Name | File | Default | What it changes |
|---|---|---|---|
ACCENT | script.js | #5b5bf0 | The colour of the chosen cell and of the average bars. |
LOW | script.js | #e2623f | The colour of an average below the pass mark. |
PASS | script.js | 70 | The pass mark: below this average the row changes colour. |
STEP | script.js | 4 | How many points the grade changes on every tap of plus and minus. |
SPRING | script.js | 1 | How much the cell ring and the bars bounce. |
On the site or in the app of a school gradebook, a course platform or a tool for teachers; the same table with its cell to correct carries a team’s scores, a project’s hours, an order’s quantities or a price list.
The table is at most 352 pixels wide and narrows with the screen: names shorten with an ellipsis, the three grade columns stay 42 pixels wide. Row height is sized on the screen’s height too. The minus and plus keys are 40 pixel circles, under the table, within thumb reach.
The rows are already in place with their bars and averages complete; the ring appears on the cell without moving, grades and averages change without rolling and the bars take their length at once. 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 5.8 KB; the libraries: GSAP 28 KB.
Tested on 28 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.