Skip to content
animorio
IT
All components

Availability poll

Calendars, HoverGSAP, CSS onlyMediumCompressed weight: Demo 5.4 KBGSAP 28 KBFreeDownload the zip

The poll for finding a meeting time, in a card on white: four times, each with the avatars of who already said yes, the count “3 of 5” and a band of colour as wide as the share of yeses. One tap on the row says “I can”: the box fills and the check draws itself, your avatar joins the line making room for itself, the band stretches with a bounce and the count rolls. The “Best” tag jumps to the time with most yeses, and at the bottom you read which one is leading.

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>
<!--
  "Availability poll" 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>Availability poll</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 date poll of a meeting: four times with who can make it, one tap to say "I can", the row filling up,
         your avatar joining the line and the Best tag moving to the time with most yeses -->
    <section class="ap" data-ap aria-label="Availability poll">
      <header class="ap__head">
        <div class="ap__what"><strong>Offsite planning call</strong><span>Tap every time that works for you</span></div>
        <span class="ap__mine"><b data-outmine>0</b> picked</span>
      </header>

      <ul class="ap__list">
        <li><button type="button" class="ap__slot" data-slot data-day="Tue 9 Dec" data-time="10:00" data-yes="M,L" aria-pressed="false"><i class="ap__fill" data-fill></i><span class="ap__box"><svg viewBox="0 0 16 16" aria-hidden="true"><path data-tick d="M3.500 8.300 6.700 11.400 12.600 5" pathLength="1"></path></svg></span><span class="ap__when"><strong>Tue 9 Dec</strong><span>10:00 to 10:45</span></span><span class="ap__best" data-best>Best</span><span class="ap__who" data-who></span><span class="ap__n"><span class="ap__clip"><span data-outn>2 of 5</span></span></span></button></li>
        <li><button type="button" class="ap__slot" data-slot data-day="Tue 9 Dec" data-time="15:30" data-yes="S" aria-pressed="false"><i class="ap__fill" data-fill></i><span class="ap__box"><svg viewBox="0 0 16 16" aria-hidden="true"><path data-tick d="M3.500 8.300 6.700 11.400 12.600 5" pathLength="1"></path></svg></span><span class="ap__when"><strong>Tue 9 Dec</strong><span>15:30 to 16:15</span></span><span class="ap__best" data-best>Best</span><span class="ap__who" data-who></span><span class="ap__n"><span class="ap__clip"><span data-outn>1 of 5</span></span></span></button></li>
        <li><button type="button" class="ap__slot" data-slot data-day="Wed 10 Dec" data-time="14:00" data-yes="M,L,I" aria-pressed="false"><i class="ap__fill" data-fill></i><span class="ap__box"><svg viewBox="0 0 16 16" aria-hidden="true"><path data-tick d="M3.500 8.300 6.700 11.400 12.600 5" pathLength="1"></path></svg></span><span class="ap__when"><strong>Wed 10 Dec</strong><span>14:00 to 14:45</span></span><span class="ap__best" data-best>Best</span><span class="ap__who" data-who></span><span class="ap__n"><span class="ap__clip"><span data-outn>3 of 5</span></span></span></button></li>
        <li><button type="button" class="ap__slot" data-slot data-day="Thu 11 Dec" data-time="09:00" data-yes="L,S,I" aria-pressed="false"><i class="ap__fill" data-fill></i><span class="ap__box"><svg viewBox="0 0 16 16" aria-hidden="true"><path data-tick d="M3.500 8.300 6.700 11.400 12.600 5" pathLength="1"></path></svg></span><span class="ap__when"><strong>Thu 11 Dec</strong><span>09:00 to 09:45</span></span><span class="ap__best" data-best>Best</span><span class="ap__who" data-who></span><span class="ap__n"><span class="ap__clip"><span data-outn>3 of 5</span></span></span></button></li>
      </ul>
      <p class="ap__foot"><span class="ap__clip ap__clip--foot"><span data-outbest>Leading: Wed 10 Dec at 14:00</span></span></p>
    </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>

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.

28 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 “Availability poll” 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 white, a rounded card: at the top “Offsite planning call”, “Tap every time that works for you” and on the right the pill “0 picked”. Below, four rounded pale grey rows, one per time: an empty box, the day in bold (“Wed 10 Dec”) and the time (“14:00 to 14:45”), on the right the grey circles with the initials of who can make it, overlapping, and the count “3 of 5”. Behind each row a pale purple band is as wide as the share of yeses; the row with most yeses has the purple “Best” tag. At the bottom: “Leading: Wed 10 Dec at 14:00”. Tapping a row the box turns purple with a bounce and the white check draws itself, the row’s edge takes the colour, a purple “You” circle pops in on the left of the line pushing the others, the band stretches and the count rolls to “4 of 5”. If that time takes the lead, “Best” leaves the previous row and appears here with a small jump, and the bottom line rolls. Between equals the earlier time wins. A second tap takes the yes back: the circle closes, the band goes back and “Best” returns to where it was.

How it works

Who said yes

For each time the list of who can make it and your yes kept apart: the count, the band’s width and the leader are worked out from them at every tap.

Your avatar joins

The new circle is born at scale zero with a negative margin as wide as itself: growing and putting the margin back, it pushes the line without a jump.

Who leads

The most voted; between equals the earliest. “Best” only moves when the leader changes, not at every tap.

The row is a button

The whole row is a button with `aria-pressed`: the box is only the sign, the target is 50 pixels tall.

Values to change

NameFileDefaultWhat it changes
ACCENTscript.js#5a54d6The colour of your yeses: the check, your avatar, the row’s band and “Best”.
TOTALscript.js5How many people are invited, you included.
LOOPscript.jstrueLeft alone, the demo’s pointer picks a few times and removes one.

Try them in the Playground

When to use it

In a calendar or teamwork app, in the invitation to a meeting, a dinner or a match, on an event page with several possible dates; the same poll carries the choice of a restaurant, the evening’s film, a shift to cover or a delivery date.

On phones

The card is at most 352 pixels wide and about 325 tall. Each row is 50 pixels tall and all of it can be tapped; under 350 pixels the gaps between the row’s parts narrow and the circles stay overlapped.

With reduced motion

No bounces or jumps: the box fills with the check already drawn, the circle appears in its place, band, count and the “Best” tag change in one step. The demo’s pointer does not start.

Pitfalls

  • The leader is not told by colour alone: there is the “Best” tag, the bottom line writes it and every choice is announced to screen readers with the new count.
  • Between equals you need a fixed rule (here the earliest), otherwise “Best” jumps back and forth between two equal rows.
  • The check’s stroke goes from 1 to 0 of `stroke-dashoffset`: with GSAP’s pixel rounding it would appear all at once.
  • The line of circles is reversed (`row-reverse`): the last one added sits on the left and above the others, with no z-index.
  • Names, dates and times are invented; in a real app times should be shown in the viewer’s time zone.

Libraries

GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.

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

Testing

Tested on 2 December 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 components