Skip to content
animorio
IT
Back to the library

Delivery frequency

Hover, SVGGSAP, CSS onlyMediumCompressed weight: Demo 5.4 KBGSAP 28 KBFreeDownload the zip

Choosing how often the refill of a subscription product arrives: a three-place selector (every two, four or six weeks) and below it a strip of twelve weeks with the parcels on their delivery weeks. Changing frequency the parcels slide to their new weeks, the ones too many close up and the missing ones drop into place, while deliveries and monthly cost are counted again.

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>
<!--
  "Delivery frequency" 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>Subscription delivery frequency with the parcels that move along the weeks</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 refill plan of a shop: choosing how often it arrives, the parcels slide to their new weeks on the
         twelve-week strip, the ones too many shrink away, and deliveries, monthly cost and next date are recounted -->
    <section class="plan" data-plan aria-label="Refill plan">
      <header class="plan__head">
        <div><span>Refill plan</span><h1>Oat hand soap, 500 ml</h1></div>
        <p class="plan__price"><strong><span data-cur>€</span><span data-month>15</span></strong><small>a month</small></p>
      </header>

      <div class="freq" role="radiogroup" aria-label="Delivery frequency" data-freq><span class="freq__thumb" data-thumb aria-hidden="true"></span></div>

      <div class="weeks" aria-hidden="true">
        <div class="weeks__lane" data-lane></div>
        <div class="weeks__ticks" data-ticks></div>
        <div class="weeks__months"><span>This month</span><span>Next</span><span>After</span></div>
      </div>

      <p class="plan__foot"><span class="roll"><span data-count>3 deliveries in 12 weeks</span></span><span class="roll plan__next"><span data-next>First in 4 weeks</span></span></p>
    </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.

22 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 “Delivery frequency” 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

On a light grey background, a white card: at the top “Refill plan”, the product’s name and on the right the monthly cost. Below, a selector with three places (Every 2 weeks, Every 4 weeks, Every 6 weeks) and a white thumb. Then the strip of twelve weeks: a band split into twelve cells, the delivery ones darker, below it the three months and above it the parcels, teal boxes with their tape, each over its week. At the bottom two lines: how many deliveries in twelve weeks and how soon the first arrives. Choosing another frequency the thumb slides while stretching, the parcels leave one after the other for their new weeks and settle with a small bounce; going to more frequent deliveries the extra parcels drop from above, going to sparser ones the ones too many shrink and disappear. The monthly cost counts to the new figure and the two lines roll.

How it works

Six parcels, three layouts

There are always six parcels, as many as the most frequent plan needs. For each frequency parcel number k sits at week k times the frequency, if it falls within the twelve: the position is left in percent of the strip, so nothing to recalculate on resize.

Three movements

A parcel that was there and stays slides to its new position with back.out; one that appears is put in place and drops from 12 pixels above while growing from zero; one too many scales to zero. The delay follows the direction of the change: from the first parcel when they spread out, from the last when they close up.

The sums

Deliveries, monthly cost (price times four divided by the weeks) and first delivery come from the chosen frequency; the cost counts with power2.out and the two lines roll one shortly after the other, so the card is never left without text.

Values to change

NameFileDefaultWhat it changes
PRICEscript.js15The price of one delivery.
PICKscript.js2The frequency chosen at the start: 1 every two weeks, 2 every four, 3 every six.
MOVEscript.js0.7How many seconds the parcels take to move.
STAGGERscript.js0.05The delay between one parcel and the next.
CURRENCYscript.js€The currency symbol.
ACCENTscript.js#0e9f8eThe parcels’ colour.
PAUSEscript.js2On its own: how many seconds it stays on a frequency.
LOOPscript.jstrueLeft alone, a pointer tries the three frequencies.

Try them in the Playground

When to use it

For the product page or the subscriptions area of a shop selling refills: soap, coffee, pet food, contact lenses, razors, vitamins. The buyer sees on the calendar what changes, not just a number in a dropdown. It also suits a service’s frequency: cleaning, gardening, lessons.

On phones

The same card, as wide as the screen minus the margins, with selector and strip measured on the height too; the frequency is chosen with a tap.

With reduced motion

No sliding or dropping parcels or stretching thumb: parcels, cells, cost and lines are at their state at once.

Pitfalls

  • The parcels too many do not go back to the first week before disappearing: they stay where they were and close there, otherwise they would cross the whole strip.
  • The deliveries are drawn parcels, not dots: a box with its tape, and the week’s cell darkens under it.
  • The strip is hidden from screen readers (it is a drawing): at each change a line says frequency, deliveries and monthly cost.

Libraries

GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.

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

Testing

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