Skip to content
animorio
IT
All components

Liquid date range calendar

Calendars, Physics, SVGGSAP, CSS onlyAdvancedCompressed weight: Demo 10 KBGSAP 28 KBFreeDownload the zip

The date range picker of an analytics app, on black: October in a grid on a graphite card. Press a day and drag (or tap and then hover): the aqua green band flows between the days like a liquid, turns from the end of one week to the start of the next, swells at the end that is running and lands with a small bounce. Its two ends can be grabbed and pulled again; underneath, the bars of each day’s sessions light up inside the range and the summary «Oct 12 – Oct 28 · 17 days» rolls.

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>
<!--
  "Liquid date range calendar" 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 date range calendar with the liquid you pull by its ends</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 date range picker of an analytics app: one month in a grid. Press a day and drag (or click, then move):
         the band of the range flows between the days like a liquid, with a small bounce at its end. Its two ends can be
         grabbed and pulled again. Under the grid the bars of the daily sessions light up inside the range, and the
         summary rolls to the new dates -->
    <section class="picker" data-picker aria-label="Date range">
      <header class="picker__head">
        <div class="picker__title">
          <span class="picker__eyebrow">Date range</span>
          <span class="picker__month">October 2026</span>
        </div>
        <div class="picker__total">
          <span class="roll picker__sessions" data-sessions>0</span>
          <span class="picker__unit">sessions</span>
        </div>
      </header>

      <div class="week" aria-hidden="true">
        <span>Mo</span><span>Tu</span><span>We</span><span>Th</span><span>Fr</span><span class="is-we">Sa</span><span class="is-we">Su</span>
      </div>

      <div class="grid" data-grid role="grid" aria-label="October 2026">
        <svg class="liquid" data-liquid aria-hidden="true">
          <defs>
            <linearGradient id="liquid-fill" x1="0" y1="0" x2="0" y2="1">
              <stop class="stop-hi" offset="0"/>
              <stop class="stop-lo" offset="1"/>
            </linearGradient>
            <filter id="liquid-glow" x="-20%" y="-40%" width="140%" height="180%">
              <feGaussianBlur stdDeviation="9"/>
            </filter>
            <filter id="liquid-goo" x="-10%" y="-25%" width="120%" height="150%" color-interpolation-filters="sRGB" data-goo>
              <feGaussianBlur in="SourceGraphic" stdDeviation="5" result="blur" data-goo-blur/>
              <feColorMatrix in="blur" mode="matrix" values="1 0 0 0 0  0 1 0 0 0  0 0 1 0 0  0 0 0 24 -11" result="goo"/>
              <feGaussianBlur in="goo" stdDeviation="2.2" result="soft"/>
              <feSpecularLighting in="soft" surfaceScale="3.2" specularConstant="0.85" specularExponent="24" lighting-color="#ffffff" result="spec">
                <feDistantLight azimuth="240" elevation="52"/>
              </feSpecularLighting>
              <feComposite in="spec" in2="goo" operator="in" result="shine"/>
              <feComposite in="shine" in2="goo" operator="arithmetic" k1="0" k2="0.5" k3="1" k4="0"/>
            </filter>
          </defs>
          <path class="liquid__glow" data-glow filter="url(#liquid-glow)"/>
          <path class="liquid__body" data-body fill="url(#liquid-fill)" filter="url(#liquid-goo)"/>
        </svg>
        <div class="days" data-days></div>
      </div>

      <div class="bars" data-bars aria-hidden="true"></div>

      <footer class="picker__foot">
        <span class="roll picker__range" data-range>Oct 12 &ndash; Oct 28</span>
        <span class="picker__dot" aria-hidden="true">&middot;</span>
        <span class="roll picker__count" data-count>17 days</span>
      </footer>
    </section>

    <!-- the drawn pointer of the autopilot -->
    <svg class="hand" data-hand viewBox="0 0 24 24" aria-hidden="true">
      <path d="M5 2.8l13.4 9.6-6.1.9 3.6 7-2.6 1.3-3.6-7-4.7 4.2z"/>
    </svg>
    <p class="sr" aria-live="polite" data-live></p>
  </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.

35 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 “Liquid date range calendar” 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 black background a graphite card with soft corners, the thread of light on its top edge, shadows on several planes and the finest grain. At the top «Date range» and «October 2026» on the left, on the right the total sessions of the period with «sessions». Below them the weekdays and the October grid, with Saturdays and Sundays dimmer. As it opens, the aqua green band pours from the 12th to the 28th: it runs along the week, turns to the start of the next and lands with a small bounce, and the numbers it covers turn dark. It is a real liquid: the rows touch and melt a little into each other, a specular light draws its rounded edge and under it glows a halo of the same colour. Press a day and drag, and the band is born there and follows the finger slightly behind, the drop at its end swells when it runs and wobbles when it lands; the two ends (the first and the last day, bolder and wider) can be grabbed and pulled. You can also tap a day, hover over the others and tap the last one. Under the grid thirty-one thin bars, each day’s sessions, light up as the liquid covers them; at the bottom the summary «Oct 12 – Oct 28 · 17 days» and the total at the top roll letter by letter. Left alone, a drawn pointer pulls the 28th back to the 21st, picks the 5th to the 9th with two taps, drags from the 14th to the 30th and goes back to the 12th to the 28th.

How it works

Two ends on a spring

The range is two ends, each with a position, a speed and a target in grid «slots», reading the grid as a single row (a slot is the day plus the offset of the first of the month). Every frame a damped spring pulls them towards their target, in two half-frame steps with time capped at 1/30 of a second. The end under the finger is always B: grabbing the first day swaps the two.

The finger in continuous slots

While dragging, B’s target is not a day but a decimal number: the row from the nearest vertical position, the column from x divided by the pitch of the days. So the band flows between two days too and, changing row, the target jumps seven slots and the liquid runs to the end of the week and starts again from the beginning of the next. On release the target is rounded and a push in the direction of the gesture makes the bounce.

The band row by row

For each week the range is cut with the row and a rounded rectangle as wide as the piece is drawn; when the piece is shorter than a day it is lower too, so in the new row the liquid grows from nothing like a drop instead of popping in. At the two ends an extra circle swells with the speed, leans in the direction of travel and wobbles with a fading sine.

A liquid from an SVG filter

Everything is one path with one filter: a blur, then a colour matrix that pushes up the contrast of the alpha channel (the «goo») and melts nearby pieces together, then a second blur and an feSpecularLighting with a distant light drawing the rounded edge, added arithmetically. The blur and the filter region are worked out again from the size of the days on every resize; the same path, blurred, makes the halo.

Numbers, bars and summary

From the continuous position of the ends every day knows whether it is covered (dark number) or an end (bolder and wider on the wdth axis), but the classes only change when the row of states changes. Each sessions bar takes as opacity how much of its slot is covered. The summary and the total only roll the letters that change, staggered. When nothing moves the loop stops.

Values to change

NameFileDefaultWhat it changes
FLOWscript.js1How quickly the liquid follows the finger: 0.5 slow and thick, 2 quick.
BOUNCEscript.js1How much the end bounces and wobbles when it lands (0 none).
THICKscript.js0.8The height of the band compared with one day.
GOOscript.js1How much the band melts between the days and the rows: 0.3 crisp, 1.6 runny.
START_DAYscript.js12The first day of the range when it opens.
END_DAYscript.js28The last day of the range when it opens.
SESSIONSscript.js2860The average sessions of one day, behind the bars and the total.
SPEEDscript.js1The speed of the drawn pointer: 2 twice as fast, 0.5 half.
AUTOscript.jstrueThe drawn pointer uses the picker by itself until someone touches it.

Try them in the Playground

When to use it

At the top of an analytics, sales or marketing dashboard, in the reports of an online shop, in the admin panel of a SaaS app or a booking service: wherever people pick the period of the data and dragging should feel like a pleasure.

On phones

The same animation: the days are measured on the screen height too and the card stays inside the box; dragging with a finger does not scroll the page, and you can also tap the first day and then the last.

With reduced motion

Nothing flows: the band is already in place and jumps straight to the chosen days, with no drop and no bounce; numbers and summary change with a fade; the drawn pointer is not shown.

Pitfalls

  • With a rounded rectangle always as tall as the band, the new row made a one day piece pop in: now the piece is lower when it is shorter than a day and grows from nothing.
  • The filter region in percent of the path changed every frame and clipped the halo: it is in userSpaceOnUse, worked out from the size of the grid.
  • Grabbing the first day as the end to pull moved the other one: the end under the finger always becomes B by swapping the two.

Libraries

GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.

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

Testing

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