Skip to content
animorio
IT
Back to the library

Resort map lens

Hover, Transitions, ImagesGSAP, CSS onlyMediumCompressed weight: Demo 13 KBGSAP 28 KBFreeDownload the zip

The map of a made-up lakeside resort, Fernhollow, seen from above in a real photo: white discs with a green dot mark the places of the estate and pop in one after the other with a small bounce. Under the pointer a point grows and a label with its name comes in beside it; on a click it swells further and its inside becomes a lens showing the ground below, blurred and a little grey, inside a white ring. Meanwhile the side panel opens with two masks sliding in opposite directions, the place's numbers and its details as an accordion; the map glides to bring the place into view, drags, leans with the pointer, and the shadows of clouds drift over it.

Rebuilt from scratch studying explore.ownprimland.com by Outpost, Ingamana, Robbin Cenijn, Robert Borghesi, arpeegee, Matyas Sochor: the idea is theirs; code, copy and images are ours. Read how it’s made

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>
<!--
  "Resort map lens" 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>Fernhollow, the estate map</title>
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fontsource-variable/fraunces@5.3.0/opsz.css">
  <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 map of a made-up lakeside resort, Fernhollow, seen from above. White points mark the places of the estate:
         they pop in one after the other, grow under the pointer with a label, and on a click the inside of the point
         turns into a lens that shows the ground below, blurred and a little grey, while a side panel opens -->
    <div class="map" data-map>
      <div class="map__photo" data-photo>
        <img src="mappa.webp" width="1024" height="682" alt="A lakeside estate seen from above: a mown lawn with a few round trees, a gravel path, the edge of the reeds and a small boathouse on a pier over dark water." draggable="false">
      </div>
      <!-- the photo mirrored past its right and bottom edges: the map can slide under the open panel without a seam -->
      <div class="map__ext map__ext--r" aria-hidden="true"></div>
      <div class="map__ext map__ext--b" aria-hidden="true"></div>
      <div class="map__spots" data-spots>
        <!-- filled in by script.js from PLACES -->
      </div>
    </div>

    <div class="shade" aria-hidden="true" data-shade>
      <span class="shade__cloud" data-cloud></span>
      <span class="shade__cloud" data-cloud></span>
      <span class="shade__cloud" data-cloud></span>
    </div>
    <div class="mist" aria-hidden="true">
      <span class="mist__puff mist__puff--a" data-mist></span>
      <span class="mist__puff mist__puff--b" data-mist></span>
    </div>
    <div class="vignette" aria-hidden="true"></div>

    <header class="head">
      <span class="brand">
        <svg class="brand__mark" viewBox="0 0 24 24" aria-hidden="true">
          <path d="M12 21V9.5"/>
          <path d="M12 13.2c-3.4-.3-5.6-2.5-6-6.2 3.5.2 5.7 2.3 6 6.2Z"/>
          <path d="M12 10.6c.4-3.6 2.4-5.8 5.8-6.4-.1 3.6-2.2 5.9-5.8 6.4Z"/>
        </svg>
        <span class="brand__name">Fernhollow</span>
        <span class="brand__sub">Lake Estate</span>
      </span>
      <a class="enquire" href="#" data-enquire><span>Enquire</span></a>
    </header>

    <div class="compass" aria-hidden="true" data-compass>
      <svg viewBox="0 0 48 48">
        <circle class="compass__ring" cx="24" cy="24" r="21"/>
        <g data-needle>
          <path class="compass__n" d="M24 9.5 27 24h-6Z"/>
          <path class="compass__s" d="M24 38.5 21 24h6Z"/>
        </g>
        <text class="compass__letter" x="24" y="7.6" text-anchor="middle">N</text>
      </svg>
    </div>

    <p class="hint" data-hint>
      <svg viewBox="0 0 20 20" aria-hidden="true"><circle cx="10" cy="10" r="3.2"/><circle cx="10" cy="10" r="7.4"/></svg>
      <span>Choose a place, drag the map</span>
    </p>

    <div class="tag" role="presentation" data-tag>
      <span class="tag__arrow" aria-hidden="true"></span>
      <span class="tag__kind" data-tag-kind></span>
      <span class="tag__name" data-tag-name></span>
    </div>

    <aside class="panel" aria-label="Place details" aria-hidden="true" data-panel>
      <div class="panel__inner" data-panel-inner>
        <div class="panel__top">
          <span class="panel__kind" data-p-kind></span>
          <button class="close" type="button" aria-label="Close" data-close>
            <svg viewBox="0 0 20 20" aria-hidden="true"><path d="M5.5 5.5l9 9M14.5 5.5l-9 9"/></svg>
          </button>
        </div>
        <h2 class="panel__title" data-p-title></h2>
        <p class="panel__text" data-p-text></p>
        <dl class="facts" data-p-facts></dl>
        <div class="details" data-p-details></div>
        <a class="book" href="#" data-book>
          <span class="book__words"><span>Plan a visit</span><span aria-hidden="true">Plan a visit</span></span>
          <svg class="book__arrow" viewBox="0 0 14 14" aria-hidden="true"><path d="M2.5 7h8.4M7.4 3.3 11.1 7l-3.7 3.7"/></svg>
        </a>
      </div>
    </aside>

    <span class="pointer" aria-hidden="true" data-ghost>
      <svg viewBox="0 0 24 24"><path d="M5 3.5 18.5 12l-6 1.4-3.1 5.6Z"/></svg>
    </span>
  </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 “Resort map lens” 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

The full screen is an aerial photo of a lakeside estate: a lawn mown in stripes with a few round oaks, a gravel path, the edge of the reeds and a small boathouse on a pier over dark water. At the top in the middle the Fernhollow mark (three leaves drawn in lines) with the words Lake Estate, at the right the Enquire pill, at the bottom left a compass, at the bottom in the middle the cream pill ‘Choose a place, drag the map’. At first the map comes closer from 1.25 to 1 in three seconds and the five points pop in one after the other with a small bounce: cream discs with a three layer shadow and the green dot in the middle. Under the pointer a point grows to 1.2, its dot widens, a pale halo lights up and the cream label comes in beside it with its little arrow, the kind of place in copper and the name in a serif; if the label would leave the box it moves to the other side. On a click the point reaches 1.55 and its inside opens into a lens: the ground below, a little magnified, blurred and mixed with 20 % grey, with a glassy sheen, inside a white ring; the dot turns white. The cream panel opens from the right (from the bottom on narrow boxes) with two masks sliding in opposite directions: the kind, the name large in a serif, two lines, three numbers of the place, three accordion details and the ‘Plan a visit’ button. The map glides to put the place in the middle of what is left free. The shadows of three clouds drift slowly over everything, inside the lens too, and two wisps of mist breathe in the corners. The map drags (past the edge it resists and springs back), leans a little with the pointer and the compass needle swings with the drag. Until someone touches it, a drawn pointer visits the places, opens them and opens the first detail.

How it works

Three numbers for every point

Every point has a state of three numbers, s (the scale), h (the hover) and a (the lens), and a single function draws it: the scale of the button's child, the halo, the lens circle and the dot colour. Every change is a tween of these three numbers lasting 0.33 seconds with power2.out: the site uses 1 second with timeScale(3). At rest 1, hovered 1.2, chosen 1.55; the entrance goes from 0 to 1 with back.out(1.5) and a delay of 0.2 + 0.12 seconds per point.

The lens is the map below, scaled back

Inside the disc there is a copy of the photo as big as the map, moved so that the place sits in the middle of the disc, with the blur, a grey veil at 20 % and a glassy sheen. The circle that shows it is a clip-path circle(a × 47.5 %): with the lens open a white ring of 5 % is left, like the 0.5 × 0.95 radius in the site's shader. Since the disc grows to 1.55, the copy is scaled by 1.1 / s around the place: it stays aligned with the ground and magnifies it slightly.

The label that changes side

A single label for all the points: at every frame it sits to the right of the point, at the distance of its radius at 1.2 plus 12 pixels, centred in height; if its right edge would leave the box it moves to the left and the little arrow changes side, as the site does comparing rect.right with innerWidth. It comes in over 0.25 seconds with power1.

The double mask panel

The panel and its content start at xPercent 100 and −100 (GSAP's wrap([100, −100])) and reach 0 together in 0.75 seconds with power3.inOut: the frame comes in from the right while the content slides into it from the left, and seems to stand still. On narrow boxes yPercent is used. The details open with height: auto in 1 second with quart.inOut and the text in 0.6 seconds after 0.2; they close the other way round.

The map, the camera and the clouds

The map covers the box with a 14 % margin (8 % on narrow boxes) and only moves with x and y, always within its edges: dragged past an edge it takes a quarter of the gesture and on release it springs back in 0.7 seconds. When a place is chosen a tween brings it to the middle of the free space beside the panel. The cloud shadows are three blurred radial gradients in multiply above everything, so they pass inside the lenses too, like the site's getCloudsShadow.

Values to change

NameFileDefaultWhat it changes
HOVER_SCALEscript.js1.2How big a point gets under the pointer (the site uses 1.2).
ACTIVE_SCALEscript.js1.55How big the chosen point gets when it becomes a lens (the site uses 1.55).
STATE_TIMEscript.js0.33Seconds of every change of a point: the site plays 1 s at three times the speed.
LENS_BLURscript.js5How blurred the ground is inside the lens, in pixels.
LENS_GREYscript.js0.2How much grey is mixed into the lens (the site uses 0.2).
LENS_ZOOMscript.js1.1How much the lens magnifies the ground below.
POP_STAGGERscript.js0.12Seconds between one point and the next when they pop in (the site uses .12).
PANEL_TIMEscript.js0.75Seconds of the two masks of the panel (the site uses .75).
CAMERA_TIMEscript.js1.1Seconds the map takes to bring the chosen place into view.
PARALLAXscript.js14How many pixels the map leans away from the pointer.
CLOUD_SPEEDscript.js1How fast the shadows of the clouds drift.
AUTO_PAUSEscript.js2.6Left alone, seconds spent on each place.
LOOPscript.jstrueLeft alone, the drawn pointer keeps visiting the places.

Try them in the Playground

When to use it

For the map of a resort, a hotel, a campsite, a park, a campus or a winery: when the places are few and each has a story, and visitors should explore the place from above before booking. It also works for the plan of an event or a neighbourhood.

On phones

The same animation with adapted sizes: the points are measured on the width and the height, the panel rises from the bottom and shows the kind, the name, two lines, the numbers and the button, while the map brings the chosen place into the free space above. A finger drags the map and a tap chooses a place; the hover label is for the mouse only.

With reduced motion

The map is already in place and does not lean, the clouds stand still, the points fade in; choosing a place the lens is already open and the panel fades in, with no masks and no map movement; the details open without sliding.

Pitfalls

  • The lens cannot be a backdrop-filter on the disc: the disc grows to 1.55 and the filter would also blur its own shadow and the nearby points. Here it is a copy of the photo inside the disc, moved and scaled by 1 / s around the place, so it stays aligned while the disc grows.
  • GSAP scales the button's child, not the button: the button keeps its size, the hit area does not jump and the percentage position is never touched.
  • The pixel sizes of the map and of the copies inside the lenses are redone on resize, even with the panel open: the preview box changes height while you watch it.
  • Dragging and clicking share one pointerdown: under 5 pixels of movement it is a click on the point, above it the map moves; the panel is left out, otherwise the accordion would drag the map.
  • The drawn pointer stops for good at the first real gesture (event.isTrusted), so it never steals the map from someone using it.

Libraries

GSAP 3.15.0, Fraunces (font variabile) 5.3.0, Mona Sans (font variabile) 5.3.0.

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

Testing

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