
The colour columns
Hover, SVG
Who can give blood to whom: two rows of eight types, donors above and recipients below. Move over a type and the red lines fan out to every compatible one, a light running along them, while the heading says how many it gives to or receives from.
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>
<!--
"Blood type compatibility" 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>Blood type compatibility</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">
<!-- who can give red cells to whom: pick a blood type among the donors or the recipients
and the lines draw themselves to every compatible type on the other row -->
<section class="bt" data-bt aria-label="Blood type compatibility">
<header class="bt__head">
<b class="bt__type" data-type>O</b>
<span class="bt__say">
<span class="bt__tag"><span data-tag>Universal donor</span></span>
<span class="bt__line"><span data-line>gives to all 8 types</span></span>
</span>
</header>
<div class="bt__board" data-board>
<span class="bt__label">Donor</span>
<div class="bt__row" data-row="give" role="group" aria-label="Donor blood type"></div>
<svg class="bt__wires" data-wires aria-hidden="true"></svg>
<div class="bt__row" data-row="take" role="group" aria-label="Recipient blood type"></div>
<span class="bt__label">Recipient</span>
</div>
</section>
<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 “Blood type compatibility” from Animorio and fit it into my siteEach type is three bits: A, B and Rh. A donor can give to a recipient if all its bits are also in the recipient’s: (d & r) === d. The lines come from that, with no hand-written table.
Each line is a Bézier curve from the middle of the picked chip to the middle of the compatible one, measured with getBoundingClientRect and worked out again on resize. With pathLength 1 it draws by animating stroke-dashoffset.
The lines start in order of distance from the picked chip. A second copy of each path, with a short dash, is the light that runs along it as soon as it is drawn.
| Name | File | Default | What it changes |
|---|---|---|---|
ACCENT | script.js | #e5484d | The colour of the blood and the lines. |
START | script.js | O- | The type picked at first among the donors (O-, O+, A-, A+, B-, B+, AB-, AB+). |
DRAW | script.js | 0.55 | How many seconds a line takes to draw. |
STAGGER | script.js | 0.05 | The gap between one line and the next, in seconds. |
BEND | script.js | 0.55 | How much the lines bend (0 = straight, 1 = very soft). |
LOOP | script.js | true | Left alone, a pointer visits a few types. |
On the site of a blood donor association or a hospital, in a donation campaign, on an explainer or school page; and wherever you must show what is compatible with what: plans and features, devices and accessories, roles and permissions.
The same scene: the eight chips fit in one row and are tapped one at a time. The lines are worked out again if the screen changes size.
The lines are already drawn. Picking another type, lines, chips and words change without motion.
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 19 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.