Skip to content
animorio
IT
Back to the library

Floor plan assembly

Scroll, SVGGSAP, CSS onlyMediumCompressed weight: Demo 8.3 KBGSAP + ScrollTrigger 45 KBLenis 5.3 KBFreeDownload the zip

Scroll inside the preview

The plan section of Egret, a made-up AI agent for architects, on light paper with a single orange: as you scroll, two big sentences take turns, then the floor plan of a flat draws itself, with the walls settling one at a time in random order, the furniture, the dimensions, and the orange marks of what needs fixing, each with its own card.

Rebuilt from scratch studying heronaiapp.com by Bearplus, Kenny Ho: 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>
<!--
  "Floor plan assembly" 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>Egret</title>
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fontsource-variable/mona-sans@5.3.0/wdth.css">
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fontsource-variable/jetbrains-mono@5.3.0/index.css">
  <link rel="stylesheet" href="style.css">
</head>
<body>
  <!-- the plan section of Egret, a made-up AI agent for architects. The stage sticks while you scroll: two big sentences
       take turns, then the floor plan of a flat assembles itself (the walls settle one by one in random order, then the
       furniture, then the dimensions), and the agent marks what needs fixing, each mark opening its own small card. -->
  <main>
    <section class="corsa" data-corsa>
      <div class="palco" data-palco>
        <div class="grana" aria-hidden="true"></div>

        <header class="testa">
          <div class="marchio">
            <svg viewBox="0 0 20 20" aria-hidden="true"><path d="M3 16 L10 4 L17 16 Z M7 16 L10 10.5 L13 16"/></svg>
            <span>Egret</span>
          </div>
          <div class="conto" aria-live="polite">
            <span class="conto__nome">Issues found</span>
            <span class="conto__cifra" data-cifra><span class="conto__rullo" data-rullo><span>0</span><span>1</span><span>2</span><span>3</span></span></span>
          </div>
        </header>

        <div class="tavola" data-tavola>
          <div class="pianta" data-pianta>
            <svg class="disegno" viewBox="-24 -26 448 336" aria-label="Floor plan of a flat" data-svg>
              <g class="guida" data-guida></g>
              <g class="fantasma" data-fantasma></g>
              <g class="muri" data-muri></g>
              <g class="porte" data-porte></g>
              <g class="arredi" data-arredi></g>
              <g class="quote" data-quote></g>
              <g class="segni" data-segni></g>
            </svg>
            <div class="schede" data-schede>
              <div class="scheda" data-scheda="0"><span class="scheda__tag">Clearance</span><span class="scheda__testo">Door clearance too narrow</span><span class="scheda__fix">Widen to 32 in</span></div>
              <div class="scheda" data-scheda="1"><span class="scheda__tag">Stair</span><span class="scheda__testo">Missing handrail</span><span class="scheda__fix">Add rail, both sides</span></div>
              <div class="scheda" data-scheda="2"><span class="scheda__tag">Egress</span><span class="scheda__testo">Bedroom window too small</span><span class="scheda__fix">Raise opening to 5.7 sq ft</span></div>
            </div>
          </div>
          <div class="frasi" aria-hidden="true">
            <p class="frase" data-frase>Right there with you</p>
            <p class="frase" data-frase>For the whole design</p>
          </div>
        </div>

        <footer class="piede">
          <div class="stato">
            <span class="stato__tag">Review</span>
            <span class="stato__righe" data-righe>
              <span data-riga>Scroll to read the model</span>
              <span data-riga>Placing the walls</span>
              <span data-riga>Furniture and fixtures</span>
              <span data-riga>Measuring every room</span>
              <span data-riga>Checking clearances</span>
              <span data-riga>3 fixes ready for review</span>
            </span>
          </div>
          <span class="piede__lato">Level 01, Flat B</span>
        </footer>
      </div>
    </section>
  </main>

  <script src="https://cdn.jsdelivr.net/npm/gsap@3.15.0/dist/gsap.min.js"></script>
  <script src="https://cdn.jsdelivr.net/npm/gsap@3.15.0/dist/ScrollTrigger.min.js"></script>
  <script src="https://cdn.jsdelivr.net/npm/lenis@1.3.26/dist/lenis.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.

40 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 assembly” 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 stage stays put while you scroll. At first there is only one big sentence, “Right there with you”; as you scroll “For the whole design” arrives, from three rem lower and a little bigger, while the first leaves upwards, getting smaller. Then the sentences make way for the drawing: the dashed guide lines grow from their middle, the faint outline of the walls appears and the real walls settle one at a time, in random order, each from a little bigger to its size. The doors and windows arrive, then the thin-line furniture (the stair, the sofa, the table with its chairs, the kitchen, the bed, the wardrobe, the bathroom), then the dimensions, which grow from the middle with their lengths in metres. At the end the agent marks three things to fix: a small orange square opens with an echo, its leader line draws itself to its black card and the card opens (“Door clearance too narrow”, “Missing handrail”, “Bedroom window too small”). The counter in the top right corner rolls from zero to three and the line at the bottom tells what the agent is doing. Scrolling back up, everything comes apart backwards.

How it works

One sticky stage and one timeline

The section is four screens tall and the stage inside is sticky, 100lvh tall. The whole drawing is a paused GSAP timeline tied to the scroll by a ScrollTrigger with scrub: the scroll moves its playhead, forwards and backwards.

The two sentences

The second sentence comes in from y 3rem, scale 1.04 and opacity 0; the first leaves towards y −3rem and scale 0.96. These are the numbers of the plan section of heronaiapp.com, which moves its sentences in and out with the same pair.

Walls in random order

Each wall is an SVG rectangle going from opacity 0 and scale 1.1 to 1, with stagger from "random". The site uses an amount of 0.02, so its walls arrive almost together; here the amount is wider (the WALL_SPREAD knob), so the random order shows.

Dimensions from the middle

Each dimension is a group with the line and two slanted ticks: scaleX (or scaleY for the vertical ones) from 0 to 1 with transform-box fill-box, so it grows from its middle; the number appears when the line is nearly done.

The marks and the cards

The mark is a small orange square with a light core and an echo that grows and fades once. The leader line draws itself with strokeDashoffset and the card, in HTML above the drawing, is placed in percent at the end of the line, so it follows the plan at any size.

Counter and status line

On every timeline update the script counts how many marks have passed and which phase it is in: the digit roller and the status line change with their own tween, not with the scrub, so they stay crisp even when the scroll stops halfway.

Values to change

NameFileDefaultWhat it changes
RIDEscript.js1How much scroll the whole plan takes: 2 is twice as long.
WALL_SPREADscript.js1.6How spread out the walls land (the site uses 0.02: all at once).
WALL_SCALEscript.js1.1How big each wall is before it settles.
ISSUESscript.js3How many issues the agent marks, from 0 to 3.
SCRUBscript.js0.6How many seconds the drawing lags behind the scroll.
GHOSTscript.js11: the faint outline of the walls shows before they land; 0: no outline.

Try them in the Playground

When to use it

For the site of software for architects, an architecture studio, an estate agency or a builder: the section that explains what the product does as you scroll, with the drawing building itself before your eyes.

On phones

The same animation: the plan is the biggest 4:3 box that fits between the header and the footer, the sentences and the cards are sized on the height too and the floor label at the bottom right hides.

With reduced motion

Nothing moves: the plan appears already finished, with the three marks, the cards and the counter at three, in a fade.

Pitfalls

  • With scrub a 0.02 stagger makes the walls land practically together: to see the random order the amount has to be wider.
  • The counter and the status line should not be tied to the scrub, which would leave them halfway between two digits: they are worked out from the timeline’s time and animated separately.
  • The cards are HTML above the SVG, in percent of the same 4:3 box as the plan: if the plan stretched without keeping its ratio, the cards would no longer touch their lines.
  • GSAP scales SVG rectangles around their centre only with transform-box: fill-box; without it, scale 1.1 would shift them towards the bottom right corner.

Libraries

GSAP 3.15.0, ScrollTrigger 3.15.0, Lenis 1.3.26, Mona Sans (font variabile) 5.3.0, JetBrains Mono (font variabile) 5.3.0.

Compressed with gzip, the three demo files weigh 8.3 KB; the libraries: GSAP + ScrollTrigger 45 KB, Lenis 5.3 KB.

Testing

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