Skip to content
animorio
IT
All components

Mountain hut calendar

Calendars, Hover, TransitionsGSAP, CSS onlyMediumCompressed weight: Demo 11 KBGSAP 28 KBFreeDownload the zip

The calendar for booking a night at an invented mountain hut, Valmora Hut, on white like a Dribbble shot. Under every day a row of thin lines tells how many beds are left; with the guest stepper at the top, each extra guest tints one more line pine green in every night, and the nights without room for the whole group go out in a cascade, crossed by a thin stroke that draws itself. The chosen day gets a green disc that lands with a bounce, the total rolls at the bottom and full nights push the tap back with a little shake.

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>
<!--
  "Mountain hut 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 hut calendar with beds that go out for your group</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 night picker of an invented mountain hut: every day shows its free beds as thin bunk lines;
         adding a guest tints one more line in every day, and the nights without room for the whole group go out in a cascade -->
    <section class="hut" data-card aria-label="Valmora Hut, book a night">
      <header class="hut__head">
        <div class="hut__name">
          <svg class="hut__peak" viewBox="0 0 28 18" aria-hidden="true"><path d="M1 17 9.5 5l3.6 5L18 3l9 14"></path><path class="hut__snow" d="M15.6 6.4 18 3l2.5 3.8"></path></svg>
          <div>
            <p class="hut__title">Valmora Hut</p>
            <p class="hut__sub">2,410 m · half board</p>
          </div>
        </div>
        <div class="guests" role="group" aria-label="Guests">
          <button class="guests__btn" type="button" data-minus aria-label="One guest less"><svg viewBox="0 0 16 16" aria-hidden="true"><path d="M3.5 8h9"></path></svg></button>
          <p class="guests__val" aria-live="polite"><span class="guests__n" data-guests></span><span class="guests__l">guests</span></p>
          <button class="guests__btn" type="button" data-plus aria-label="One guest more"><svg viewBox="0 0 16 16" aria-hidden="true"><path d="M3.5 8h9M8 3.5v9"></path></svg></button>
        </div>
      </header>

      <div class="cal">
        <div class="cal__top">
          <p class="cal__month" data-month></p>
          <div class="cal__navs">
            <button class="cal__nav" type="button" data-prev aria-label="Previous month"><svg viewBox="0 0 16 16" aria-hidden="true"><path d="M10 3 5 8l5 5"></path></svg></button>
            <button class="cal__nav" type="button" data-next aria-label="Next month"><svg viewBox="0 0 16 16" aria-hidden="true"><path d="m6 3 5 5-5 5"></path></svg></button>
          </div>
        </div>
        <div class="cal__week" aria-hidden="true"><span>Mo</span><span>Tu</span><span>We</span><span>Th</span><span>Fr</span><span>Sa</span><span>Su</span></div>
        <div class="cal__clip" data-clip></div>
      </div>

      <footer class="foot">
        <div class="foot__info">
          <p class="foot__date" data-date></p>
          <p class="foot__sub" data-sub></p>
        </div>
        <p class="foot__total" data-total aria-live="polite"></p>
        <button class="reserve" type="button" data-reserve disabled>
          <span class="reserve__in">
            <svg class="reserve__tick" viewBox="0 0 16 16" aria-hidden="true"><path d="m3.5 8.4 3 3 6-6.6" data-tick></path></svg>
            <span class="reserve__txt" data-reserve-txt>Reserve</span>
          </span>
        </button>
      </footer>
    </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.

26 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 “Mountain hut 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 white background the Valmora Hut card stands alone, an invented hut at 2,410 metres with half board: a warm white with a very fine grain, a one-pixel edge and a soft shadow leaning green. Top left, the outline of two peaks drawn with a thread, the snow of one in pine green, the name and the altitude; on the right the guest stepper, a sunken pill with minus and plus on two raised white keys and the number in between. Below sits the month, July 2027, with its two arrows and the week from Monday, Saturday and Sunday in green. Every day has its number and below it a row of eight hairline marks, one per bed: free beds are grey, taken ones nearly vanish, and the first ones, as many as the guests, are green and a little taller. Nights without room for the whole group are dimmed and crossed by a slanted thread; full nights always are. Tapping a day drops a green disc, glossy on top and darker below, onto the number; it squashes for a moment and settles on a spring, the number turns white and at the bottom the date, the guests and the total roll in letter by letter. With plus every night gets one more green mark and the ones that no longer fit go out one after another, like a wave starting from the stepper: the number fades, the night sinks a pixel and comes back, the thread draws itself from the left. If the chosen night has no room any more, the disc shakes and lifts off, and below you read how many beds are left. A tap on a dimmed night makes it tremble and says why. The arrows slide the month sideways, column after column. The Reserve button lights up once a night is chosen and on tap becomes Held with a drawn tick.

How it works

Beds as hairlines

Every day is a button with the number, a disc, a hover ring, a row of eight <i> and a thread. A single function, paintFit, reads the number of guests and gives each mark the class free (a free bed) or mine (a bed of the group); colours change with a CSS transition whose delay sits in a variable, --dl, written by the script day by day.

The wave from the stepper

Each day’s delay is its distance from the stepper, which sits top right outside the grid (column 6.6, row -1.2), times CASCADE: so colour and thread move like a wave rolling down to the left. Nights that change state also get a GSAP timeline with the same delay: one pixel down (or up) and back with elastic.out.

The slanted thread

The thread crossing a night is a child inside a parent rotated by -38 degrees in CSS: GSAP only scales the child along x, from the left when the night goes out and from the right when it comes back, and the CSS rotation is not wiped by the inline transform.

The disc that lands

The disc drops from -8 pixels and half size in a fraction of LAND_TIME, squashes (scaleX 1.08, scaleY 0.92) for 70 milliseconds and settles with elastic.out. When the guests outnumber the beds of the chosen night, a timeline shakes it with x keyframes and then shrinks it away.

Rolling lines

Date, guests and total are windows one line tall: the old line leaves upwards and the new one comes in letter by letter with back.out; the total rolls downwards when it drops. The new month enters column after column with a stagger computed from column and row, in the direction of the arrow.

Values to change

NameFileDefaultWhat it changes
PRICEscript.js45The price of one bed for one night, half board, in euros.
START_GUESTSscript.js2The guests when it opens.
MAX_GUESTSscript.js8The most guests, also the number of bed marks.
ACCENTscript.js#2f6b50The green of the chosen night, the group and the button.
CASCADEscript.js0.02The seconds between one day and the next when nights go out in a cascade.
LAND_TIMEscript.js0.55The seconds of the disc landing on the day.
PAUSEscript.js1The seconds the autopilot waits between one gesture and the next.

Try them in the Playground

When to use it

For booking a mountain hut, a hostel, a campsite or a group house, where how many places are left matters more than the price; and anywhere a date is picked for several people: a guided tour, a group dinner, a class, a hike.

On phones

The card takes the width of the box minus the margins; days are 26 to 46 pixels tall with 6.9vh, the grid always has six rows so months never change height, and everything else (stepper, button, gaps) shrinks with vh: the whole month fits even in the phone box. A tap does what a click does.

With reduced motion

No springs, shakes or slides: the disc fades in, the thread over dimmed nights fades in, the new month and the lines change with a fade and the drawn pointer stays hidden.

Pitfalls

  • GSAP’s inline transform wiped the thread’s rotation set in CSS: the thread drew straight. Now CSS rotates the parent and GSAP only scales the child.
  • With five or six weeks depending on the month the card changed height on every arrow: the grid always has 42 places and six rows.
  • When the guest count changed, the old and new numbers stacked widened the pill for a moment: during the roll the number window has a fixed width.

Libraries

GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.

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

Testing

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