Skip to content
animorio
IT
Back to the library

Feature voting board

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

A product’s feature requests board: five ideas with their votes. Your vote fills the arrow with orange, the number rolls and the idea climbs over the one above on a spring, lifting a little; meanwhile other people’s votes arrive, with a short light on the button, and move the rows too.

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>
<!--
  "Feature voting board" 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>Feature voting board with rows that overtake each other</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 feature requests board of a product: five ideas with their votes; your vote fills the arrow, the count
         rolls and the idea climbs over the one above on a spring; votes from other people keep arriving and move
         the rows too, with a small light on the count that changed -->
    <section class="board" data-board aria-label="Feature requests">
      <header class="head">
        <div>
          <p class="head__brand">Orbit Mail</p>
          <h1 class="head__title">What should we build next?</h1>
        </div>
        <p class="head__live"><span data-total>657</span> votes</p>
      </header>

      <ol class="ideas" data-ideas>
        <li class="idea" data-idea data-votes="212"><button class="vote" type="button" aria-pressed="false" data-vote><svg viewBox="0 0 16 16" aria-hidden="true"><path d="M8 3.2 13 9.6H3Z"></path></svg><span class="vote__n"><span data-n>212</span></span></button><div class="idea__text"><p class="idea__name">Snooze until I am back at my desk</p><p class="idea__tag idea__tag--doing">In progress</p></div></li>
        <li class="idea" data-idea data-votes="128"><button class="vote" type="button" aria-pressed="false" data-vote><svg viewBox="0 0 16 16" aria-hidden="true"><path d="M8 3.2 13 9.6H3Z"></path></svg><span class="vote__n"><span data-n>128</span></span></button><div class="idea__text"><p class="idea__name">Shared drafts with comments</p><p class="idea__tag idea__tag--planned">Planned</p></div></li>
        <li class="idea" data-idea data-votes="127"><button class="vote" type="button" aria-pressed="false" data-vote><svg viewBox="0 0 16 16" aria-hidden="true"><path d="M8 3.2 13 9.6H3Z"></path></svg><span class="vote__n"><span data-n>127</span></span></button><div class="idea__text"><p class="idea__name">Dark theme for the editor</p><p class="idea__tag">Under review</p></div></li>
        <li class="idea" data-idea data-votes="96"><button class="vote" type="button" aria-pressed="false" data-vote><svg viewBox="0 0 16 16" aria-hidden="true"><path d="M8 3.2 13 9.6H3Z"></path></svg><span class="vote__n"><span data-n>96</span></span></button><div class="idea__text"><p class="idea__name">Undo send, up to a minute</p><p class="idea__tag">Under review</p></div></li>
        <li class="idea" data-idea data-votes="94"><button class="vote" type="button" aria-pressed="false" data-vote><svg viewBox="0 0 16 16" aria-hidden="true"><path d="M8 3.2 13 9.6H3Z"></path></svg><span class="vote__n"><span data-n>94</span></span></button><div class="idea__text"><p class="idea__name">Keyboard shortcuts you can edit</p><p class="idea__tag">Under review</p></div></li>
      </ol>
    </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>

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.

29 values to change

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 “Feature voting board” 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

In the middle, on a warm grey background, a white card: the product name, the question ‘What should we build next?’ and on the right the total votes. Below, five ideas in order of votes: on the left of each a button with an up arrow and the number, then the idea’s title and in small type its status. Hovering a button its edge turns orange. Tapping the arrow of the third idea, the button squeezes and comes back on a spring, turns solid orange with a white arrow, the number rolls from 127 to 128 and the row, which now has the same votes as the one above but the more recent vote, lifts with a shadow, grows slightly, climbs over it and lands with a small bounce, while the other goes down to its place. Shortly after, other people’s votes arrive on the last idea: at each vote a ring of orange light fades round the button and the number rolls; at the third the idea overtakes the one above. The total at the top follows. Another tap on your arrow removes the vote and the row goes back down. Left alone, a pointer votes and the others’ votes arrive; with a real hand, other people’s votes keep arriving now and then.

How it works

The order

The ideas are sorted by votes; on a tie the one with the most recent vote wins (a counter that goes up at every vote). So your vote, if it ties, puts you in front.

The overtake

Before reordering, the position of each row is measured, then the rows are put back in the DOM in the new order and measured again: each starts from the difference and returns to zero. Those going up use elastic.out and take the is-moving class (shadow, round corners, above the others); those going down use power3.out, with no bounce.

Your vote

The button has aria-pressed: pressed it turns solid, the arrow fills and the number rolls up; removing the vote it rolls down.

Other people’s votes

other adds a vote to an idea, rolls the number and takes from 1 to 0 a CSS variable that lights a ring round the button. After a real hand has touched the board, a delayedCall brings one roughly every OTHERS seconds, on one of the three least voted ideas.

Values to change

NameFileDefaultWhat it changes
SPRINGscript.js0.8How long the spring of the row changing place lasts, in seconds.
LIFTscript.js1.03How much the row grows while overtaking (1 = not at all).
OTHERSscript.js1.5How often, in seconds, someone else’s vote arrives (0 = never).
ACCENTscript.js#ff5a36The colour of your vote.
PAUSEscript.js2.2By itself: the pause after each of the pointer’s votes, in seconds.
LOOPscript.jstrueLeft alone, a pointer votes and the others’ votes arrive.

Try them in the Playground

When to use it

For the suggestions page or the public roadmap of an app, a game, a product with a community: people who use the product see that their vote counts, because the row really moves. Also good for audience questions at an event.

On phones

The same card, as wide as the screen: long titles are cut with an ellipsis, the total at the top disappears on narrow screens and the rows are slightly shorter on a short screen.

With reduced motion

No animated overtaking: the rows change place at once and the numbers change with a fade. Other people’s votes do not arrive by themselves after the first touch.

Pitfalls

  • The row going up needs a solid background and must sit above the others, or while it passes the two texts are read one on top of the other.
  • If the card is enlarged with zoom, distances read from the screen must be divided by the zoom before giving them to GSAP.
  • On a real site other people’s votes come from the server: here they are invented, and the order on a tie must be decided there too.

Libraries

GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.

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

Testing

Tested on 14 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