Skip to content
animorio
IT
All components

Team seats slider

Sliders, Physics, HoverGSAP, CSS onlyMediumCompressed weight: Demo 8.8 KBGSAP 28 KBFreeDownload the zip

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.

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>
<!--
  "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&nbsp;<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>

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.

36 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 “Team seats slider” 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

A white card with a layered shadow: Team plan and the discount pill at the top, then the big number of seats, the price per seat and the monthly total, below the track with its ticks and a help line. Dragging, the thumb follows the hand on a spring and settles with a small detent on every seat, squashes a little as it runs, and the ticks under it rise as under a lens. Past 10 the notch between the first and second tile tightens and disappears, a blade of light runs along the fill up to the join, the pill hops with a glint and becomes Save 10%; the prices roll and the line below rises into «You save». At 25 the same with 20%. Pushed past 50 the thumb sticks out a few pixels as on a rubber band, gets an orange ring and the line becomes «Talk to sales»; let go, it springs back to 50. Going back down the notches reopen with a bounce.

How it works

The thumb on a real spring

A 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.

The rubber band past the end

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.

Tiles that fuse

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).

Rolling numbers

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.

The lens on the ticks

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.

Values to change

NameFileDefaultWhat it changes
STARTscript.js8Seats chosen when the card opens.
MAX_SEATSscript.js50The last seat on the track; past it the track resists.
PRICEscript.js12Dollars per seat per month, before any discount.
TIER_2_FROMscript.js10Seats where the second tile and its discount begin.
TIER_2_SAVEscript.js10Discount of the second tile, in percent.
TIER_3_FROMscript.js25Seats where the third tile begins.
TIER_3_SAVEscript.js20Discount of the third tile, in percent.
STIFFNESSscript.js280Spring of the thumb: higher is snappier.
DAMPINGscript.js24How quickly the thumb stops wobbling.
DETENTscript.js0.6How strongly each seat holds the thumb while dragging (0 free, 1 stepped).
ROLL_TIMEscript.js0.6Seconds for a digit to roll into place.
LENSscript.js1.3How tall the ticks under the thumb grow.
SPEEDscript.js1Pilot speed.
LOOPscript.jstrueThe pilot starts over.

Try them in the Playground

When to use it

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.

On phones

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.

With reduced motion

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.

Pitfalls

  • With font-variant-numeric: tabular-nums Mona Sans switches to slashed zero figures that looked like another typeface: the rolling columns already take the width of the widest digit, so tabular figures are not needed.
  • The blade of light stopped on the join and stayed there like a white smudge: now it fades out at the end of its run.
  • In the pill, display inline-flex swallowed the space between Save and the number: there is a non-breaking space.

Libraries

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.

Testing

Tested on 10 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 components