
The star rating
Ratings, SVG, Hover
A dropdown where more than one option can be chosen. The panel drops from under the field on a spring; each chosen option fills its box and draws the tick, and lands in the field as a pill. The ones that do not fit fold into a “+1”, a round counter says how many there are and at the bottom “Clear” empties it.
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>
<!--
"Multi-select dropdown" 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>Multi-select dropdown with the ticks and the summary that counts</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">
<!-- a dropdown where more than one option can be chosen: each tick draws itself, the choices land in the
field as small pills, the ones that do not fit fold into a "+2" and the counter rolls -->
<div class="ms" data-ms>
<span class="ms__label" id="ms-label">Subjects</span>
<button class="field" type="button" data-field aria-haspopup="listbox" aria-expanded="false" aria-labelledby="ms-label">
<span class="field__hint" data-hint>Choose subjects</span>
<span class="field__chips" data-chips></span>
<span class="field__count" data-count-box aria-hidden="true"><span data-count>0</span></span>
<svg class="field__chev" data-chev viewBox="0 0 16 16" aria-hidden="true"><path d="M4 6.200 8 10l4-3.800"></path></svg>
</button>
<div class="panel" data-panel hidden>
<ul class="opts" data-opts role="listbox" aria-multiselectable="true" aria-labelledby="ms-label"></ul>
<div class="panel__foot"><span data-foot>None chosen</span><button type="button" data-clear>Clear</button></div>
</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.
24 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 “Multi-select dropdown” from Animorio and fit it into my siteA list of true and false, one per option. From there one function rewrites the field: the first MAX_PILLS choices as pills, the rest in a “+N”, the counter and the bottom line. Only what is new is animated, the pill that just landed or the “+N” that changes.
Each box has a blue square going from scale 0 to 1 with back.out and a path with pathLength 1 that draws itself 0.1 seconds later; removing it, the stroke retracts first and then the square.
The panel starts at scaleY 0.86 and 10 pixels higher, with the origin at the top, and arrives with back.out; the options come in staggered by 0.035 seconds. The container already keeps the height of the open panel, so nothing around it moves.
| Name | File | Default | What it changes |
|---|---|---|---|
OPTIONS | script.js | [["Maths", "Mon, Wed"], ["Physics", "Tue"], ["Literature", "Thu"], ["History", "Fri"], ["Art", "Sat"]] | The options: name and note on the right (made up). |
CHOSEN | script.js | [] | The options already chosen at the start, by name. |
MAX_PILLS | script.js | 2 | How many choices show in the field before the “+N”. |
HINT | script.js | "Choose subjects" | The text of the empty field. |
ACCENT | script.js | #2f6bff | The colour of the ticks. |
OPEN | script.js | 0.5 | How many seconds the panel takes to open. |
LOOP | script.js | true | Left alone, a pointer opens, picks three options, closes and then clears. |
In a sign-up form (subjects, courses, interests), in the filters of a list or a dashboard, wherever a plain select would force you to hold a key to choose several options.
The same field, at most as wide as the screen minus the margins; the options are 40 pixels high and get shorter on a low screen, so the open panel stays fully visible.
The panel appears and disappears without dropping, ticks and pills arrive already in place, the counter changes figure without rolling.
GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 6.0 KB; the libraries: GSAP 28 KB.
Tested on 15 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.