
The star rating
Ratings, SVG, Hover
The button that hands in an assignment in an online school. On the right it says how long is left before the deadline; pressed, the sheet lifts off the tray, the ring around the icon fills while the file goes up with the percentage in place of the time, then the sheet drops into the tray, the tick draws itself and the tag becomes “On time”.
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>
<!--
"Submit assignment 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>Submit assignment button with the sheet that drops into the tray and the deadline that turns on time</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 button that hands in an assignment in an online school: pressed, the ring around the icon fills while
the file goes up, the sheet drops into the tray, a tick draws itself and the time left becomes "On time" -->
<button class="asg" type="button" data-asg>
<span class="asg__body" aria-hidden="true"><span class="asg__wash" data-wash></span><span class="asg__light"></span></span>
<span class="asg__edge" aria-hidden="true"></span>
<span class="seat" data-seat aria-hidden="true">
<svg viewBox="0 0 24 24">
<circle class="seat__track" cx="12" cy="12" r="10.2"></circle>
<circle class="seat__ring" data-ring cx="12" cy="12" r="10.2" pathLength="1" transform="rotate(-90 12 12)"></circle>
<g data-sheet><path class="seat__sheet" d="M9.200 5.200h4.100l1.900 1.900v6.100a.8.8 0 0 1-.8.8H9.200a.8.8 0 0 1-.8-.8V6a.8.8 0 0 1 .8-.8Z"></path><path class="seat__lines" data-lines d="M10.200 9h3.600M10.200 11.200h2.600"></path></g>
<path class="seat__tray" d="M6.600 14.200v2.300a1.300 1.300 0 0 0 1.300 1.300h8.200a1.300 1.300 0 0 0 1.300-1.300v-2.300"></path>
<path class="seat__tick" data-tick pathLength="1" d="M8.2 12.4 10.9 15 15.9 9.400"></path>
</svg>
</span>
<span class="label">
<span class="label__main"><span data-word>Submit assignment</span></span>
<span class="label__sub"><span data-sub>Essay draft</span></span>
</span>
<span class="tag" aria-hidden="true"><span data-left>2h left</span></span>
</button>
<p class="sr" data-live aria-live="polite"></p>
<svg class="ghost" data-ghost viewBox="0 0 24 24" aria-hidden="true"><path d="M5 3.2 19.2 11l-6.3 1.6-3.3 5.9Z"></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.
16 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 “Submit assignment button” from Animorio and fit it into my siteAn object with a value from 0 to 1: the ring (stroke-dashoffset on a circle with pathLength 1) and the percentage in the tag come from the same number, moved with power1.inOut, no spring.
The sheet is an SVG group: it lifts by 1.6 units and rotates by minus 5 degrees, then sways with sine.inOut for the whole upload; at the end it drops by 2.4 with power2.in into the tray, which stays still in front.
The three texts roll staggered by 0.05 seconds, the tick draws itself in 0.36 seconds, the disc goes to 1.14 and comes back with elastic.out. If HOURS_LEFT is zero or less the tag says “Overdue” and then “Late”.
| Name | File | Default | What it changes |
|---|---|---|---|
TASK | script.js | "Essay draft" | The assignment to hand in (made up). |
FILE | script.js | "essay-draft.pdf · 1.2 MB" | The file being sent (made up). |
HOURS_LEFT | script.js | 2 | How many hours are left before the deadline; 0 or less means late. |
UPLOAD | script.js | 1.3 | How many seconds the upload lasts. |
ACCENT | script.js | #7a4bff | The colour of the upload. |
OK | script.js | #12a868 | The colour once the assignment is in. |
HOLD | script.js | 2.6 | Alone: how many seconds the confirmation stays before going back. |
LOOP | script.js | true | Left alone, a pointer tries it by itself. |
On an assignment page of a school or an online course, in a student portal, in any form where a file is handed in before a deadline (an application, a tender, a filing). In a real product the ring follows the real upload.
The same pill, at most as wide as the screen minus the margins; there is no hover, the tap does the same job.
No swaying sheet, flooding tint or bounces: the ring and the percentage still rise (they are the information), the texts change without rolling and the tick appears.
GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 5.7 KB; the libraries: GSAP 28 KB.
Tested on 15 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.