
The colour columns
Hover, SVG
A revision session with flashcards: the card shows the question, a tap draws a line and brings up the answer. “Got it” sends it away to the right, “Again” to the left, tilted, and the pile that takes it counts with a bounce; underneath, the deck’s sheets get thinner and at the end the card says how it went.
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>
<!--
"Revision flashcards" 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>Revision flashcards with the card that slides away and the two piles that count</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">
<!-- a revision session with flashcards: the card shows the question, a tap reveals the answer under a line that
draws itself; "Got it" sends it right, "Again" left, and the two piles count while the deck gets thinner -->
<section class="fc" data-fc aria-label="Flashcards">
<header class="fc__head">
<div><span>Spanish basics</span><h1>Revision</h1></div>
<p class="fc__left"><strong data-left>6</strong> cards left</p>
</header>
<div class="deck" data-deck>
<span class="deck__under deck__under--b" data-under-b aria-hidden="true"></span>
<span class="deck__under" data-under-a aria-hidden="true"></span>
<button class="card" type="button" data-card aria-live="polite">
<span class="card__tag" data-tag>Question</span>
<span class="card__q" data-q></span>
<svg class="card__rule" viewBox="0 0 100 2" preserveAspectRatio="none" aria-hidden="true"><path data-rule pathLength="1" d="M0 1h100"></path></svg>
<span class="card__a" data-a></span>
<span class="card__hint" data-hint>Tap to see the answer</span>
</button>
</div>
<div class="piles">
<button class="pile pile--again" type="button" data-again><svg viewBox="0 0 16 16" aria-hidden="true"><path d="M3.500 8a4.500 4.500 0 1 0 1.500-3.400M5 2v2.800h2.800"></path></svg><span>Again</span><b><i data-n-again>0</i></b></button>
<button class="pile pile--got" type="button" data-got><svg viewBox="0 0 16 16" aria-hidden="true"><path d="M3.200 8.400 6.500 11.500 12.800 4.800"></path></svg><span>Got it</span><b><i data-n-got>0</i></b></button>
</div>
</section>
<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.
32 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 “Revision flashcards” from Animorio and fit it into my siteOn the page there is one card and two empty sheets below: when the card is out its text is changed and it comes back in from where the first sheet was (y 8, scale 0.955) with back.out. The sheets vanish when fewer than two cards are left.
The line is a path with pathLength 1 drawn in 0.45 seconds; the answer rises 8 pixels with back.out 0.14 seconds later, and the question hops 3 pixels.
x goes to 60% of the window, rotation to TILT degrees, y drops 30 with power1.in: three tweens together making a parabola. The pile’s counter rolls at 70% of the exit. When dragged, past a third of its width the card leaves to that side, otherwise it comes back with elastic.out.
| Name | File | Default | What it changes |
|---|---|---|---|
CARDS | script.js | [["la ventana", "the window"], ["el desayuno", "breakfast"], ["despacio", "slowly"], ["la lluvia", "the rain"], ["a menudo", "often"], ["el billete", "the ticket"]] | The cards: question and answer. |
THROW | script.js | 0.5 | How many seconds the card takes to leave. |
TILT | script.js | 14 | By how many degrees it tilts while leaving. |
ACCENT | script.js | #e8590c | The colour of the line and the tag. |
GOT | script.js | #12915c | The colour of the “Got it” pile. |
LOOP | script.js | true | Left alone, a pointer turns the cards and sends them to the two piles, then starts again. |
For a language app or course, an online school, a site selling courses that wants to let people try the method on the page; also for a product quiz or an app’s onboarding, by changing the cards.
The same card, at most 46% of the screen high; you tap to turn it and drag it sideways with a finger, or use the two buttons below.
The answer appears without rising, the card does not fly away: it changes text in place and the counters change figure without rolling.
GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 6.0 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.