Interactive Building/Floor Plan Help/Tips

Hey there,

I’m currently building a site that wants to use a building plan with a list attached, where every list/table item hovered or clicked highlights a specific room on that building plan.

What I currently have to do is to animate every room change by hand and do it multiple times. Once for the mouse hover and one animation/interaction for tapping/clicking basically. Changing Images on the fly, depending on the interaction.

Thats extremely tedious work and I’m wondering if anyone knows any apps, plugins, tricks or extensions that makes this easier?

Here is my read-only Link, a rough example setup, without a lot of content yet, but I hope it illustrates what I mean:
https://preview.webflow.com/preview/building-plan-example?utm_medium=preview_link&utm_source=designer&utm_content=building-plan-example&preview=ab16f1400a5fa6b90305ba0dfbaa857b&workflow=preview

Here is another website that uses this principle live:

Can this be achieved without spending hours preparing images and doing everything by hand? Or am I missing something that makes this a breeze in Webflow? Maybe someone can help me out with a tip or two!

Hi Tim, I’ve created few floor plans that light up when hovered in the past.
I will try to simply describe to you how I’ve achieved the result you’re trying to create without having the need of creating the animation for each hover.

First I take base image of the floor plan, let’s say it’s dimensions are 800x400, then i create the cutouts of each room, so if a floor has 6 rooms, i create 6 cutouts, I make sure to create a rectangle that is 800x400 and position each of the cutouts on top of the base floorplan img, while making sure that the cutouts are correctly positioned on their respective places. Now I grab the rectangle that I’ve created the one with the same size as the floorplan img, I select one cutout with the rectangle and group those two elements, I do it 5 more times since I’ve got 6 of the cutouts. What you need to be masking sure of is that the rectangle is actually a rectangle and the cutout is a path. That way we can later set the pointer-events on the element and make it so that the hover animation happens only when hovered on the cutout and not the rectangle. When exporting the images, you have to choose the file type of SVG, cuz it preserves the types of the elements withing the img like paths, texts and rectangles. Also make sure that the cutouts are colored, we’ll create and animation that will be related to opacity of the SVG images you’re creating, also don’t forget to make the rectangle without color, so that it doesnt block the floorplan under.

Now, Idk if you have more of these plans in the CMS or not, but let’s say you only have one of these plans, you don’t need to use CMS, but the CMS variant also works btw.

Now in webflow, you have to create an element that will have the img of floor plan within it, set it to contain so it doesn’t get cut off and make it relative, put another div in it, this div will be absolutely positioned and span over the full width and height of its parent. Within this div you’ll create a link block that will be 100% width and height, give it a class name, add a an img into this div, this img within the link block will also be 100% width height. Now you create the animation simply on the link block class, the animation will affect the image inside the block (it’s child), it will be opacity 0 and when hovering op will become 100%, make sure to create the hover out anim. too.
Now add the images into the links, and then make sure you put this into an embed on the site:

.PUT-CLASS-NAME-OF-THE-LINK-BLOCK {pointer-events: none;} svg path {pointer-events: auto;}

Don’t forget to put the right class name into the embed.

Since I wrote this in a rush it might be a bit hard to understand, so feel free to ask anything. Also the hover works on the floorplan interaction, I reckon you might also want it to be lighten up when hovering a text in a list maybe? I have a solution for that too, but it’s a bit finicky so I don’t want to get into now. With that lemme know if there’s a need for that feature.

No worries @kenakkda ! Thanks for the in-depth description and explanations. Its easy to understand.

Thats exactly how I’ve been doing it in the past, but given that these are much more rooms than my example, I thought maybe there are some plugins or apps that make this easier!

I have set it up exactly like you with combo classes that target each individual room that I can then animate with webflow interactions. Its just really really tedious work :grimacing:

But that will have to do for now! Thanks again!

Rive is designed specifically for interactive / programmatic animations. You might check that as a direction.

@festgebaeck Hi, maybe I’ve explained it wrong. The aproach I use can be done with only one main hover animation and without subclasses, when using CMS. The tedious work for me was to create those invidual cutouts of the rooms within the floor. I’m gonna look into the suggestion made by Michael and you should too. Tuan N