Skip to content
animorio
IT
Back to the library

Tutor finder

Transitions, HoverGSAP, CSS onlyMediumCompressed weight: Demo 5.6 KBGSAP 28 KBFreeDownload the zip

Finding a tutor by subject on a white card: the subject bar with its blue pill and the list of tutors, each with initials, subjects, rating and rate. Hovering a subject makes those who do not teach it shrink and vanish, the others move up into their place one after the other on a spring, the card shortens and the count rolls; hovering a tutor turns the rate into “Book a trial”.

The code

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>
<!--
  "Tutor finder" 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>Tutor finder</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">
    <!-- finding a tutor by subject: the subjects to choose, the tutors who do not teach it leaving and
         the others moving up into their place, with the count rolling -->
    <article class="tf" data-tf aria-label="Find a tutor">
      <header class="tf__head"><strong>Find a tutor</strong><span class="tf__count"><span data-outcount>5 tutors</span></span></header>
      <div class="tf__subs" role="tablist" aria-label="Subject" data-subs>
        <i class="tf__pill" data-pill aria-hidden="true"></i>
        <button type="button" role="tab" aria-selected="true" data-sub="all">All</button>
        <button type="button" role="tab" aria-selected="false" data-sub="maths" tabindex="-1">Maths</button>
        <button type="button" role="tab" aria-selected="false" data-sub="physics" tabindex="-1">Physics</button>
        <button type="button" role="tab" aria-selected="false" data-sub="english" tabindex="-1">English</button>
      </div>
      <ul class="tf__list" data-list></ul>
    </article>
    <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>

Playground

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

Works with Claude, Claude Code, ChatGPT, Cursor, VS Code, Windsurf, Codex, Gemini CLI

Or ask your AI assistant for it

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 “Tutor finder” from Animorio and fit it into my site
Platform licenseFree on your sites and your clients’ sites. Want it inside a website builder, a template platform or a client dashboard? There’s a license for agencies and platforms.

What it does

On a light warm ground, a rounded white card: “Find a tutor” and on the right, in blue, “5 tutors”. Below, the subject bar, “All”, “Maths”, “Physics”, “English”, with a blue pill behind the chosen one. Then five rows: a circle with initials, the name, the subjects with the rating and on the right the hourly rate. On entering the rows arrive from the right one after the other. Hovering “Maths” (or tapping it) springs the pill there; the two tutors who teach only English shrink and fade where they are, the three who stay move up to fill the gaps, one after the other, with a small bounce; the list and the card shorten and at the top the count rolls into “3 tutors for Maths”. “Physics” leaves two, “English” brings the other two back from below. Hovering a tutor tints the row slightly and the rate rolls into “Book a trial”, in blue.

How it works

Every row has a slot

The rows all sit at the top of the list, one over the other, and each is moved to its slot with a translation: the slot is its number among those passing the filter. Changing subject means recounting the slots.

Who leaves, who stays, who returns

Whoever fails the filter shrinks and fades in place. Whoever stays goes to the new slot on a spring, slightly after the one above. Whoever comes back starts a little below its slot, so it seems to rise.

The list shortens

The list’s height is the number of visible rows times a row’s height, animated: the card tightens and widens with it and stays centred.

The row pointed at

Under the pointer, or with keyboard focus, the row takes a tint and the rate rolls into the invitation to book a trial; on leaving the rate comes back.

Values to change

NameFileDefaultWhat it changes
ACCENTscript.js#3b5bfdThe colour of the chosen subject and of the avatars.
SPRINGscript.js1How much the rows bounce when they change slot.
STAGGERscript.js0.05How many seconds pass between one row and the next.
HOLDscript.js2.2How many seconds the demo’s pointer stays on each subject.
LOOPscript.jstrueLeft alone, the demo’s pointer goes over the subjects and one tutor.

Try them in the Playground

When to use it

On the site of a tutoring school, a private lessons platform or an after-school club, where you choose the subject and see who teaches it; the same filtered list carries doctors by speciality, a firm’s professionals by area, courses by level or products by category.

On phones

The card is at most 344 pixels wide and about 330 tall at most with all five tutors, and shortens when the filter leaves fewer. Long names truncate with an ellipsis. With a finger the subjects are tapped; the “Book a trial” invitation appears on focus, not on hover.

With reduced motion

No springs and no slides: on a subject change the rows are in place at once, those that do not match vanish without shrinking and the list already has its new height; the count and the rate change without rolling. The demo’s pointer does not start.

Pitfalls

  • A row hidden by the filter stays in the DOM: it has aria-hidden, leaves the Tab order and takes no clicks, otherwise the keyboard would land on tutors that cannot be seen.
  • The subjects are tabs (a tablist) changed with the arrow keys, and an aria-live region says how many tutors are left.
  • The rows move with a translation, not by changing top: that way the spring does not force the browser to recompute the page on every frame. Only the list’s height is a layout property, and it is a single one.
  • Names, ratings and rates are invented.

Libraries

GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.

Compressed with gzip, the three demo files weigh 5.6 KB; the libraries: GSAP 28 KB.

Testing

Tested on 29 November 2026

  • Desktop: Done
  • Phone: Done
  • Reduced motion: Done
  • Safari on iPhone: To do

License

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.

All animations