Skip to content
animorio
IT
Back to the library

Loading dock slots

HoverGSAP, CSS onlyMediumCompressed weight: Demo 6.2 KBGSAP 28 KBFreeDownload the zip

A loading dock’s board: four bays, six hours, taken slots with the carriers’ names and free ones to book. Under the pointer a free slot shows its plus; tapped, it fills with amber and a truck backs into it, while the line of the hour moves on.

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>
<!--
  "Loading dock slots" 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>Loading dock slots</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">
    <!-- a loading dock's morning: four bays, six hourly slots. Free slots show a plus under the pointer and are booked
         with a tap: the slot fills, a small truck backs in, the count of free slots drops. The line of "now" keeps moving -->
    <section class="dk" data-dk aria-label="Loading dock schedule">
      <header class="dk__head">
        <span class="dk__title">Loading dock</span>
        <span class="dk__free"><b data-free>0</b> free</span>
      </header>

      <div class="dk__board" data-board>
        <span class="dk__now" data-now aria-hidden="true"><i data-clock></i></span>
      </div>

      <p class="dk__say" aria-live="polite"><span data-say>Pick a free slot</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.

18 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 “Loading dock slots” 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 black, a dark card: at the top “Loading dock” and how many slots are still free; below, a grid with the hours from 8 to 13 across the top and bays A, B, C and D down the left. Taken slots are grey tiles with the carrier’s name, some two hours long; free ones are empty boxes. An amber line with the time written above it marks now and creeps forward: whatever lies wholly behind it dims and can no longer be booked. On opening the tiles arrive in a cascade. Passing over a free slot, its edge lights up and a plus appears; tapping it, the box fills with amber from its centre on a spring, a small truck backs in from the right and gives its last nudge against the dock, the free count drops with a hop and the line below rolls to “Bay C, 11:00 to 12:00, booked”. Tapping one of your own bookings again, the truck leaves and the slot is free once more.

How it works

The grid is CSS

The board is a CSS grid: one column for the bay letters and six for the hours. Taken tiles span one or two columns with grid-column and span; free slots are real buttons.

Filling the slot

The colour is a child of the slot: GSAP takes it from scale 0.4 to 1 with elastic.out over POP seconds, while the truck slides in from the right with power3.out and gives a nudge of a pixel and a half.

The line of now

The time is a number growing on the ticker by SPEED minutes a second and becomes a CSS variable: the line is placed with calc() over the six columns only. Every minute, what has passed is checked again.

Values to change

NameFileDefaultWhat it changes
ACCENTscript.js#ffb020The colour of your bookings and of the line of now.
NOWscript.js9.6The time now, in hours and tenths (9.6 = 9:36), between 8 and 14.
SPEEDscript.js1.2How many minutes pass on the board in one second (0 = time stands still).
POPscript.js0.55How many seconds a slot takes to fill.
HOLDscript.js1.5On its own: how many seconds it stops after each booking.
LOOPscript.jstrueLeft alone, a pointer books two slots and gives one back.

Try them in the Playground

When to use it

On the site or dashboard of software for warehouses, yards and haulage, where carriers book their unloading. The same grid works for meeting rooms, padel courts, charging points: rows of resources and columns of hours.

On phones

The same piece: slots are booked by tapping, rows shrink with the window’s height but stay at least 28 pixels tall, and long carrier names are cut with an ellipsis.

With reduced motion

No springs, no truck backing in, no moving line: the tapped slot changes colour at once and the time stands still.

Pitfalls

  • The board is a list at the top of the script: in a real product it comes from the server and a slot can be taken by someone else while you look, so the booking must be confirmed before colouring it.
  • Free slots are buttons with aria-pressed and a label giving bay and hour; past ones become disabled.
  • The time stops just short of the next hour: left running, the demo would end with the whole morning gone.

Libraries

GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.

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

Testing

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