
The layered button
Buttons, Hover, Physics
The seats picker in the checkout of a Team plan, on white: the track is made of three tiles, one per price tier, with a white notch between them. The thumb runs on a real spring with a small detent on every seat; when the fill crosses a notch the two tiles fuse, a light runs along the join, the discount lights up and the price per seat, the total and the saving roll digit by digit. Past 50 seats the track resists like rubber and the line below sends you to sales.
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>
<!--
"Team seats slider" 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>The team seats slider with the price tiers that fuse together</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" data-stage>
<!-- the seats picker in the checkout of a team plan: the track is made of three price tiers, like tiles with a
notch between them. Dragging past a notch fuses the two tiles, a light seals the join and the discount,
the price per seat and the total roll to their new numbers. Past 50 the track resists and sends you to sales -->
<section class="seats" data-card aria-label="Team seats">
<span class="seats__edge" aria-hidden="true"></span>
<header class="seats__head">
<span class="seats__plan">
<svg class="seats__mark" viewBox="0 0 24 24" aria-hidden="true"><rect x="4" y="4" width="7" height="7" rx="2"></rect><rect x="13" y="4" width="7" height="7" rx="2"></rect><rect x="4" y="13" width="7" height="7" rx="2"></rect><rect x="13" y="13" width="7" height="7" rx="3.5"></rect></svg>
<span>Team plan</span>
</span>
<span class="chip" data-chip>
<span class="chip__sheen" data-chip-sheen aria-hidden="true"></span>
Save <span class="roll" data-roll-pct></span>%
</span>
</header>
<p class="count"><span class="roll count__num" data-roll-seats></span> <span class="count__word" data-word>seats</span></p>
<p class="price">
<span class="price__per">$<span class="roll" data-roll-per></span> <span class="price__soft">per seat / month</span></span>
<span class="price__total">$<span class="roll" data-roll-total></span><span class="price__soft">/mo</span></span>
</p>
<div class="slider" data-slider role="slider" tabindex="0" aria-label="Number of seats"
aria-valuemin="1" aria-valuemax="50" aria-valuenow="1" aria-valuetext="1 seat">
<div class="track" data-track>
<span class="track__base" aria-hidden="true"></span>
<span class="track__fill" data-fill aria-hidden="true"><span class="track__seal" data-seal></span></span>
<span class="notch" data-notch="10" aria-hidden="true"></span>
<span class="notch" data-notch="25" aria-hidden="true"></span>
<span class="track__end" data-end aria-hidden="true"></span>
<span class="thumb" data-thumb aria-hidden="true"><span class="thumb__knob" data-knob><span class="thumb__grip"></span></span></span>
</div>
<div class="ticks" data-ticks aria-hidden="true"></div>
<div class="scale" aria-hidden="true">
<span data-at="1">1</span><span data-at="10">10</span><span data-at="25">25</span><span data-at="50">50</span>
</div>
</div>
<p class="hint" data-hint aria-live="polite">
<span class="hint__line" data-hint-a></span>
<span class="hint__line" data-hint-b></span>
</p>
</section>
<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.
36 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 “Team seats slider” from Animorio and fit it into my siteA requestAnimationFrame loop integrates a spring (STIFFNESS and DAMPING) towards the right spot, with the time step capped at 1/30 of a second and stopping when nothing moves. While held, the target is the hand position pulled towards the nearest seat by DETENT: that is the click you feel on each seat. Let go, the target is the whole seat.
Past the last seat the extra distance goes through 20·(1−e^(−d/60)): the thumb sticks out 20 pixels at most however hard you pull. Beyond 0.8 seats of push the track enters the limit state (orange ring, glow at the end, Talk to sales line), which stays until you go back below 50.
The tiles are one track with white notches placed in percent at the tier seats. Crossing a tier the notch stretches for a moment and then closes with back.in, while a gradient blade inside the fill (overflow hidden) runs up to the join and the discount pill hops elastically with its own glint. Going down the notch reopens with back.out(3).
Each digit is a column with the ten digits stacked, moved with yPercent; the digits that change start 40 milliseconds apart with back.out. If the shape of the number changes (9 to 10, 96.00 to 108.00) the column is rebuilt and rises into place.
On every frame each tick takes its scaleY from a gaussian of the distance to the thumb (LENS), and the ticks of the chosen seats turn indigo: the lens follows the spring, not the hand, so it sways with it.
| Name | File | Default | What it changes |
|---|---|---|---|
START | script.js | 8 | Seats chosen when the card opens. |
MAX_SEATS | script.js | 50 | The last seat on the track; past it the track resists. |
PRICE | script.js | 12 | Dollars per seat per month, before any discount. |
TIER_2_FROM | script.js | 10 | Seats where the second tile and its discount begin. |
TIER_2_SAVE | script.js | 10 | Discount of the second tile, in percent. |
TIER_3_FROM | script.js | 25 | Seats where the third tile begins. |
TIER_3_SAVE | script.js | 20 | Discount of the third tile, in percent. |
STIFFNESS | script.js | 280 | Spring of the thumb: higher is snappier. |
DAMPING | script.js | 24 | How quickly the thumb stops wobbling. |
DETENT | script.js | 0.6 | How strongly each seat holds the thumb while dragging (0 free, 1 stepped). |
ROLL_TIME | script.js | 0.6 | Seconds for a digit to roll into place. |
LENS | script.js | 1.3 | How tall the ticks under the thumb grow. |
SPEED | script.js | 1 | Pilot speed. |
LOOP | script.js | true | The pilot starts over. |
In the checkout or pricing page of an app with team plans, a business tool or a booking service for companies: anywhere the price drops in tiers with quantity and you want people to see where it pays to go up.
The same animation with adapted sizes: the card is 92% of the screen wide, the big number also follows the window height and a finger drags the thumb just like the mouse, even tapping anywhere on the track.
Nothing moves on its own: the thumb jumps to the chosen seat without a spring, digits change without rolling, the notches close and reopen with a fade, no blade of light and no lens on the ticks; the pilot does not start.
GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 8.8 KB; the libraries: GSAP 28 KB.
Tested on 10 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.