Skip to content
animorio
IT
Back to the library

Floor plan projects

Hover, ImagesGSAP, CSS onlyAdvancedCompressed weight: Demo 11 KBGSAP 28 KBFreeDownload the zip

The project index of Ostrava Studio, a made-up architecture practice, on warm paper: every row has a small floor plan in thin lines, the name, the city, the year and the floor area. On hover the plan lifts off the paper with its shadow, the same plan draws itself large in the viewer and the real photo of the building opens out of the plan's outline to fill the frame, with a slight zoom and grain. The four photos are real (CC0).

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>
<!--
  "Floor plan projects" 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>Architecture projects, each photo opening from its plan</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="palco" data-palco>
    <!-- the project index of Ostrava Studio, a made-up architecture practice. Every row has a small floor plan drawn
         in thin lines, the name, the city, the year and the floor area. Over a row its plan lifts off the paper, the
         same plan draws itself large in the viewer and the real photo of the building opens out of the plan's own
         outline, with a slow zoom and a breath of grain. Moving to another row opens the next photo the same way -->
    <section class="indice" data-indice aria-label="Ostrava Studio, selected projects">
      <header class="testa">
        <p class="marchio">
          <svg class="marchio__segno" viewBox="0 0 24 24" aria-hidden="true"><rect x="3.5" y="3.5" width="17" height="17" /><path d="M3.5 12h8.5v8.5" /><path d="M12 3.5v4" /></svg>
          Ostrava Studio
        </p>
        <p class="testa__nota">Selected projects <span class="testa__anni">2021 to 2024</span></p>
      </header>

      <div class="corpo">
        <div class="elenco">
          <span class="lente" data-lente aria-hidden="true"></span>
          <ul class="righe">
            <li>
              <button class="riga" type="button" data-riga data-pianta="lettura" aria-describedby="vista-nota">
                <span class="riga__dentro" data-dentro>
                  <span class="riga__pianta"><i class="riga__ombra" data-ombra></i><svg class="pianta" data-piccola viewBox="0 0 100 100" aria-hidden="true"></svg></span>
                  <span class="riga__nome"><span class="riga__titolo">Spiral Reading Room</span><span class="riga__citta">Ghent</span></span>
                  <span class="riga__dato riga__anno">2024</span>
                  <span class="riga__dato riga__area">1,240 m²</span>
                </span>
              </button>
            </li>
            <li>
              <button class="riga" type="button" data-riga data-pianta="corte" aria-describedby="vista-nota">
                <span class="riga__dentro" data-dentro>
                  <span class="riga__pianta"><i class="riga__ombra" data-ombra></i><svg class="pianta" data-piccola viewBox="0 0 100 100" aria-hidden="true"></svg></span>
                  <span class="riga__nome"><span class="riga__titolo">Courtyard House</span><span class="riga__citta">Bergen</span></span>
                  <span class="riga__dato riga__anno">2023</span>
                  <span class="riga__dato riga__area">186 m²</span>
                </span>
              </button>
            </li>
            <li>
              <button class="riga" type="button" data-riga data-pianta="terrazza" aria-describedby="vista-nota">
                <span class="riga__dentro" data-dentro>
                  <span class="riga__pianta"><i class="riga__ombra" data-ombra></i><svg class="pianta" data-piccola viewBox="0 0 100 100" aria-hidden="true"></svg></span>
                  <span class="riga__nome"><span class="riga__titolo">Pool Terrace House</span><span class="riga__citta">Comporta</span></span>
                  <span class="riga__dato riga__anno">2022</span>
                  <span class="riga__dato riga__area">312 m²</span>
                </span>
              </button>
            </li>
            <li>
              <button class="riga" type="button" data-riga data-pianta="tetto" aria-describedby="vista-nota">
                <span class="riga__dentro" data-dentro>
                  <span class="riga__pianta"><i class="riga__ombra" data-ombra></i><svg class="pianta" data-piccola viewBox="0 0 100 100" aria-hidden="true"></svg></span>
                  <span class="riga__nome"><span class="riga__titolo">Rooftop Lido</span><span class="riga__citta">Marseille</span></span>
                  <span class="riga__dato riga__anno">2021</span>
                  <span class="riga__dato riga__area">2,900 m²</span>
                </span>
              </button>
            </li>
          </ul>
        </div>

        <figure class="vista" data-vista>
          <div class="vista__carta" aria-hidden="true"></div>
          <div class="vista__foto" data-strato><img src="scala.webp" alt="A board-marked concrete stair curling up under a skylight" width="1024" height="683" decoding="async"></div>
          <div class="vista__foto" data-strato><img src="casa-di-legno.webp" alt="A timber house around a lit courtyard at dusk" width="1024" height="683" decoding="async"></div>
          <div class="vista__foto" data-strato><img src="terrazza.webp" alt="A white house with a timber deck and a pool on the terrace" width="960" height="720" decoding="async"></div>
          <div class="vista__foto" data-strato><img src="tetto.webp" alt="A concrete roof terrace with a shallow pool and the hills beyond" width="1024" height="683" decoding="async"></div>
          <i class="vista__grana" data-grana aria-hidden="true"></i>
          <svg class="pianta pianta--grande" data-grande viewBox="0 0 100 100" aria-hidden="true"></svg>

          <svg class="nord" data-nord viewBox="0 0 28 28" aria-hidden="true"><circle cx="14" cy="14" r="11" /><path d="M14 6.5 17.2 18.5 14 16.2 10.8 18.5Z" /></svg>
          <p class="vista__nota" id="vista-nota" data-invito>Hover a project to open it</p>
          <figcaption class="vista__piede" data-piede>
            <span class="materiale" data-materiale>Board-marked concrete</span>
            <span class="scala" aria-hidden="true"><svg viewBox="0 0 60 8"><path d="M.5 1v6.5h59V1M20 4v3.5M40 4v3.5" /></svg><span>0</span><span>5</span><span>10 m</span></span>
          </figcaption>
        </figure>
      </div>
    </section>

    <svg class="cursore" data-cursore viewBox="0 0 24 24" aria-hidden="true"><path d="M5 3.2l13.4 9.1-6.1 1.1 3.5 6.5-2.6 1.4-3.5-6.5-4.5 4.2z" /></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.

37 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 “Floor plan projects” 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 paper-coloured card with a 1px edge and soft shadows sits the project index of Ostrava Studio, a made-up architecture practice: four rows on the left, on the right a viewer that is a sheet of drafting paper with a fine grid and a north arrow (on a phone the viewer sits above the list). Every row has a small floor plan in thin lines, the project name, the city, the year and the floor area: the reading room with the spiral stair in Ghent, the house around a courtyard in Bergen, the house with the terrace and the pool in Comporta, the rooftop lido in Marseille. Under the pointer the row's plan lifts off the paper, tilts a little, takes the colour of clay and its shadow appears under it; a light card slides under the row on a spring, the row slides a few pixels to the right and the name, city, year and area gain weight. In the viewer the same plan draws itself large, line after line; then the real photo of the building fills the plan's outline and opens out of it to the whole frame: courtyards close towards the edge, chamfers run into their corners, the photo settles from a slight zoom and the plan, now white, grows and fades. At the bottom a frosted glass pill with the material (“Larch cladding, lit courtyard”) and a drawn scale bar arrive. Moving to another row opens the new photo with the same gesture over the one before; leaving the list folds the photo back into its plan and the plan returns to ink on the paper. On a phone you tap the row. On its own a drawn pointer walks the four rows and leaves; it stops as soon as a real pointer moves.

How it works

The plans, eight corners each

Every plan lives in a 100 by 100 square: the outline always has eight corners (a chamfered square, a U around a courtyard, an L, a T), the walls and the fine marks are separate paths. Next to the outline sits “verso”: where each corner goes on the whole frame (0 to 1) when the photo opens. The same data draws the small plan of the row, the large plan of the viewer and the clip of the photo.

The clip that starts from the plan

The photo has a clip-path polygon written by the script every frame: at k = 0 it is the plan's outline in the middle square of the viewer, at k = 1 it is the “verso” points on the frame, and in between every corner runs in a straight line. k goes from 0 to 1 in OPEN seconds with expo.inOut, in pixels measured now, so a resize halfway only changes the numbers. Meanwhile the img inside goes from ZOOM to 1 and the grain comes on.

The plan drawing itself

Every line of the plan has pathLength 1 and vector-effect non-scaling-stroke: stroke-dasharray 1 and stroke-dashoffset from 1 to 0 draw it in DRAW seconds at the same fineness at any size. When the photo enters the outline the plan turns white, grows and fades while the photo opens; closing does the opposite.

The row lighting up

A single light card (the lens) slides under the lit row with back.out, the row slides LIFT pixels, the small plan rises 3 pixels and tilts 2 degrees with its elliptical shadow under it; name and data move to a stronger weight and width with the transitions of variable Mona Sans.

The walk on its own

A drawn pointer passes over the rows one at a time, stays HOLD seconds on each and leaves the list; the first real mouse move, tap or key stops it and from there the visitor is in charge.

Values to change

NameFileDefaultWhat it changes
OPENscript.js1.05How many seconds the photo takes to open out of the plan.
DRAWscript.js0.5How many seconds the large plan takes to draw itself.
ZOOMscript.js1.14How zoomed in the photo is while it opens.
LIFTscript.js6How many pixels the lit row slides to the right.
GRAINscript.js0.08How much grain lies on the photos.
HOLDscript.js2.6How many seconds the walk on its own stays on each project.

Try them in the Playground

When to use it

For the work list of an architecture, interior or landscape studio, a builder or a high-end real estate agency: when every project has a drawing and a photo, and the step from one to the other tells the craft. Swap the photos in the four img tags of the HTML, the plans in the PIANTE object of the script, the colours in :root.

On phones

The same animations at adapted sizes: the viewer sits above the list, measured on width and height, the rows are shorter and drop the year; the photo opens when a row is tapped and stays open until another row is tapped.

With reduced motion

No movement: the large plan is already drawn, the photo arrives whole with a fade, the lit row's card appears without sliding and the small plan only takes the colour.

Pitfalls

  • A clip-path polygon only animates between polygons with the same number of points: that is why every plan has eight corners, even when six would do (two doubled corners do not show).
  • With vector-effect non-scaling-stroke the plan stays thin even at four times its size, and pathLength 1 keeps the dash that draws it right at any scale.
  • The photos open under the new one only go back to rest once the new one is fully open: before that, moving fast between rows would show the empty paper between two photos.
  • The walk on its own and the real mouse must not fight: hovering the rows listens to the mouse only after the walk has stopped, and any event with isTrusted stops it.

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