
The star rating
Ratings, SVG, Hover
The button to answer an invitation: a light pill with the question ‘Are you coming?’ and the faces of who is already coming. Pressed, the faces give way to three answers opening one after the other: Going, Maybe, Can’t. Choosing one the answers fold back, the sign takes the answer’s mark and colour, the label says it, and if you are going your avatar springs in at the front of the guests while the number rolls.
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>
<!--
"Event RSVP button" 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>RSVP button with three answers opening inside the pill and your avatar joining the guests</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 RSVP control of an event page: a pill with the question and the faces of who is coming; pressed, the
faces give way to three answers that open one after the other; choosing one, the answers fold back, the
sign takes the answer's mark and colour, the label says it, and if you are going your own avatar springs
in at the front of the guests while the count rolls -->
<div class="rsvp" data-rsvp data-answer="">
<span class="rsvp__body" aria-hidden="true"><span class="rsvp__wash" data-wash></span></span>
<button class="main" type="button" data-main aria-expanded="false">
<span class="seat" data-seat aria-hidden="true">
<svg viewBox="0 0 24 24">
<g data-env><rect x="3.6" y="6" width="16.8" height="12" rx="2.8"></rect><path d="M4.4 7.6 12 13l7.6-5.4"></path></g>
<path class="seat__mark" data-mark="going" pathLength="1" d="M6.4 12.6 10.4 16.6 17.8 8"></path>
<path class="seat__mark" data-mark="maybe" pathLength="1" d="M5.6 13.2c2-3.6 4.2-3.6 6.4-1.2s4.4 2.4 6.4-1.2"></path>
<path class="seat__mark" data-mark="no" pathLength="1" d="M7.4 7.4l9.2 9.2M16.6 7.4l-9.2 9.2"></path>
</svg>
</span>
<span class="label"><span class="label__word" data-word>Are you coming?</span></span>
</button>
<div class="opts" data-opts role="group" aria-label="Your answer">
<button type="button" data-opt="going" tabindex="-1">Going</button>
<button type="button" data-opt="maybe" tabindex="-1">Maybe</button>
<button type="button" data-opt="no" tabindex="-1">Can’t</button>
</div>
<div class="guests" data-guests aria-hidden="true">
<span class="face face--me" data-me><b>You</b></span>
<span class="face face--a"><b>LK</b></span>
<span class="face face--b"><b>AM</b></span>
<span class="face face--c"><b>JO</b></span>
<span class="guests__n"><span data-count>23</span></span>
</div>
</div>
<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.
23 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 “Event RSVP button” from Animorio and fit it into my siteThe pill is a container: inside are the main button (sign and question, with aria-expanded) and the three answer buttons, which enter the Tab order only when open.
The answers are zero wide at rest: on opening, the faces strip goes to zero and the answers strip to its width with elastic.out. The question in the middle is elastic (flex 1, overflow hidden) and gives up the room by itself.
In the seat there are the envelope and three paths: tick, wave and cross. The chosen answer draws itself with stroke-dashoffset and a CSS variable, --tone, gives its colour to seat, edge, shadow and veil.
It is already in the row, zero wide: if you are going it widens to 30 pixels and half a second later scales from 0.3 to 1 dropping 14 pixels, with elastic.out. The number rolls up; if you change answer, it goes back down.
| Name | File | Default | What it changes |
|---|---|---|---|
ASK | script.js | Are you coming? | The question at rest. |
GOING | script.js | You’re going | The label if you are going. |
MAYBE | script.js | Maybe, noted | The label if maybe. |
NO | script.js | Can’t make it | The label if you are not coming. |
GUESTS | script.js | 23 | How many people are already coming. |
ACCENT | script.js | #6457f0 | The colour of those going. |
SPRING | script.js | 0.8 | How long the spring of the opening answers lasts, in seconds. |
HOLD | script.js | 2.6 | By itself: how many seconds the answer stays before starting again. |
LOOP | script.js | true | Left alone, a pointer answers by itself. |
On the page of an event, a party, a wedding, a meetup or a work dinner: guests answer in two taps and see at once who else is coming. Also good inside an event card in an app.
The same button: the pill takes at most the screen width minus the margins and the three answers are slightly narrower, but still 42 pixels tall.
No springs: the answers appear already in place, the sign changes with a fade, the avatar appears without dropping and the numbers change at once.
GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 6.1 KB; the libraries: GSAP 28 KB.
Tested on 14 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.