Skip to content
animorio
IT
Back to the library

Poolside sunbed map

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

People searched for “sunbed”, “cabana” and “lounger” and found nothing right: here is the top-down plan of the pool at a made-up hotel, Solenne, for booking the day’s sunbed. In the middle the pool, drawn clean with thin lines of light swaying slowly, around it two rows of sunbeds with their cushions, some already taken, and three cabanas at the far end. On hover a sunbed lifts slightly and shows its price in a label; on click it lights up coral and its parasol, seen from above, opens over it, the panels unfolding as they turn and the soft shadow stretching across the deck. At the bottom the booking bar shows row and spot, “Full day · $35”, the rolling total and Reserve. Pick another and the first parasol folds shut. Minimal style.

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>
<!--
  "Poolside sunbed map" 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>Poolside sunbed map</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 pool deck of a made-up hotel, Solenne, seen from above: the pool in the middle, the rows of sunbeds around it,
         three cabanas at the far end; a free sunbed lifts and shows its price, a click opens its parasol and fills the booking bar -->
    <section class="deck" data-deck aria-labelledby="pd-title">
      <header class="top">
        <span class="brand"><svg viewBox="0 0 20 20" aria-hidden="true"><path d="M3.5 13.5a6.5 6.5 0 0 1 13 0"></path><path d="M2 16.5h16"></path><path d="M10 3.2v2M4.6 5.6l1.3 1.4M15.4 5.6l-1.3 1.4"></path></svg><span id="pd-title">Solenne Hotel</span></span>
        <span class="top__meta"><span>Pool deck &middot; Sat 12 Jul</span><span class="top__free" data-free>11 free</span></span>
      </header>

      <div class="map" data-map>
        <svg class="plan" data-plan role="group" aria-label="Pool deck seat map" xmlns="http://www.w3.org/2000/svg"></svg>
        <div class="tip" data-tip aria-hidden="true"><b data-tip-price>$35</b><span data-tip-what>Full day</span></div>
      </div>

      <footer class="bar" data-bar>
        <div class="bar__text">
          <span class="bar__line" data-where><span>Pick a sunbed</span></span>
          <span class="bar__line bar__line--soft" data-what><span>Tap a free spot on the map</span></span>
        </div>
        <span class="total" aria-label="Total"><span class="total__cur">$</span><span class="roll" data-total></span></span>
        <button class="go" type="button" data-go disabled>
          <span class="go__bg" aria-hidden="true"></span>
          <span class="go__label" data-go-label>Reserve</span>
          <span class="go__done" data-go-done aria-hidden="true"><svg viewBox="0 0 14 14"><path d="M3 7.4l2.5 2.5 5.4-5.6" pathLength="1" data-tick></path></svg>Reserved</span>
        </button>
      </footer>
      <svg class="pointer" data-pointer viewBox="0 0 20 20" aria-hidden="true"><path d="M5 3.2l10.4 7.1-4.6 1 2.6 5.1-2 1-2.6-5.1-3.6 3.2z"></path></svg>
    </section>
    <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.

33 values to change

Works with Claude, Claude Code, ChatGPT, Cursor, VS Code, Windsurf, Codex, Gemini CLI

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 “Poolside sunbed map” 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 sand-coloured paper, a warm white panel with a soft layered shadow. At the top the line mark of Solenne Hotel, a made-up hotel, the date and how many spots are free. In the middle the top-down plan: the pool in a soft water colour with a light coping, the three thin steps of the shallow end, “Shallow 0.9 m” and “Deep 1.8 m”, and five dashed lines of light swaying slowly on the water. Around it seven sunbeds per row, the cushion on the side away from the pool and thin slats; those already taken are dimmed, sand-coloured. At the far end three bigger cabanas, each with four corner posts and a double mattress. On hover a free sunbed lifts slightly on a spring, its shadow stretches, and a label with the price appears above: $45 for the row by the water, $35 for the row behind, $140 for a cabana. On click the sunbed squashes and springs back, turns coral, and its parasol opens above it, seen from above: eight scalloped panels, coral and light coral, that start stacked and unfold while the canopy turns seventy degrees and grows, with the soft shadow stretching sideways from the centre; then it rocks a degree and a half and settles. The bar at the bottom changes line by line (“Row B · Bed 4”, “Full day · $35”), the total rolls digit by digit and the free spots drop by one. Choosing a cabana folds the sunbed’s parasol shut, turning backwards, and opens a bigger one over the cabana. Reserve squeezes, turns dark and shows a tick drawing itself with “Reserved”. On its own, with a drawn pointer, the loop hovers two sunbeds, picks one, changes its mind for a cabana and books it.

How it works

One plan, turned when needed

Sunbeds, pool and cabanas are described once in landscape coordinates (440 by 280). When the box is taller than wide every point is transposed (x and y swap) and every rotation r becomes 270 − r: the same plan stands upright on a phone, with the labels always straight.

Every sunbed around its centre

Every sunbed is drawn around zero and placed with translate and rotate; inside there is a group GSAP scales with svgOrigin “0 0”, so on hover it lifts from its centre whichever way the sunbed faces.

The parasol that unfolds

The panels are all drawn in the same place, from twelve o’clock for 360/PANELS degrees, with the scalloped edge made by a quadratic curve. On opening each panel turns to its angle while the canopy goes from −SPIN to 0 degrees and from 0.22 to 1 with back.out; the shadow, a blurred ellipse, moves sideways and grows a little more slowly.

Water that barely moves

The lines of light are dashed paths recomputed every frame from GSAP’s ticker: two summed sine waves and a sliding dash, clipped to the pool’s shape with a clipPath.

The rolling total

The total has three columns, each with a blank and the digits 0 to 9: GSAP takes them to the right digit with yPercent, staggered from the right, and the blank column shrinks to zero width, so from $35 to $140 the number gains a digit without jumping.

Values to change

NameFileDefaultWhat it changes
HOTELscript.jsSolenne HotelThe made-up hotel’s name.
PRICE_FRONTscript.js45The price of a sunbed in the row by the water.
PRICE_BACKscript.js35The price of a sunbed in the back row.
PRICE_CABANAscript.js140The price of a cabana for the day.
PANELSscript.js8The parasol’s panels.
OPEN_TIMEscript.js0.8How long the parasol takes to open.
SPINscript.js70How many degrees the parasol turns as it opens.
LIFTscript.js1.08How much the sunbed lifts on hover.
WAVE_SPEEDscript.js0.6How fast the water’s lines of light sway.
LOOP_PAUSEscript.js2.2The pause once booked before the loop starts again.

Try them in the Playground

When to use it

On a hotel or resort page for booking a poolside sunbed, on a lido or beach club site for choosing parasol and lounger, in a spa or sports club app, or anywhere a spot is picked on a floor plan.

On phones

The plan is an svg that fits the box: in the low, wide phone preview box it stays landscape and fits entirely, on a full phone screen it turns upright with the rows at the sides and the cabanas at the bottom. The price label is measured each time and never goes off the side; under 380 pixels the date hides. A tap picks the sunbed and shows its price for a moment.

With reduced motion

No springs or turns: the plan opens with a sunbed already chosen and its parasol already open, the water is still, parasols, labels and bar lines fade in, the digits change without rolling and the self-running loop does not start.

Pitfalls

  • A landscape-only plan on a full phone screen left the sunbeds tiny: the points are now transposed, but a transposition is a mirror, so the rotations must be redone too (270 − r) to keep the cushions on the right side.
  • Panels rotated around their own box turned around a corner: they need svgOrigin “0 0”, the parasol’s centre, which is the origin of the group moved with translate.
  • Mona Sans’s tabular zero has a dot in the middle and looked like another sign in the total: plain digits are enough, since the columns already have a fixed width.
  • The drawn pointer stayed halfway after a real click: stopping the loop now also stops its tweens before fading it out.

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 22 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