Skip to content

Add the plan to your site

Publish your plan in Areaform, then paste its snippet into any page of your site that takes HTML: a page builder’s HTML or embed block, a theme template or a plain HTML file. The plan appears where the snippet is.

<div data-areaform="sp_demo-office"></div>
<script src="https://cdn.areaform.app/v1/embed.js" async></script>

sp_demo-office is our demo office, so the snippet works as it is; in yours it is your plan’s id. The Publish dialog shows the whole snippet with it filled in. When you publish a change, visitors see it on their next page load. You never paste the snippet again.

Put a <div data-areaform="…"> wherever each plan goes. One <script> tag on the page is enough for all of them:

<div data-areaform="sp_demo-office"></div>
<div data-areaform="sp_demo-expo"></div>
<script src="https://cdn.areaform.app/v1/embed.js" async></script>

The plan is 480 pixels tall and as wide as the space it sits in. Give it another height with data-height, in pixels:

<div data-areaform="sp_demo-office" data-height="640"></div>

In the Publish dialog, Show the plan first as sets how the plan opens: 2D, 3D, or Auto, which is 3D when the plan is at least 480 pixels wide and 2D on a phone. Visitors can switch between the two at any time.

One page can open it differently with data-view, set to 2d, 3d or auto:

<div data-areaform="sp_demo-office" data-view="3d"></div>

A link can do the same with ?af-view= in the page’s address, for example on a QR code: https://your-site.example/plan?af-view=3d. When both are there, data-view wins. A browser without WebGL 2 always gets 2D.

The page keeps a plain scroll and a one-finger swipe, so visitors scroll past the plan as past any picture. To zoom it, they hold ⌘ or Ctrl (Ctrl on Windows and Linux) while scrolling, or pinch on a trackpad. They move it by dragging; in 3D, where a drag turns the camera, by dragging with Ctrl held. On a phone, they move it with two fingers. A short hint over the plan says so when someone scrolls over it. Clicks and taps on the plan work at once.

A plan that fills its whole page, such as a kiosk screen, can take every gesture with data-gestures="greedy":

<div data-areaform="sp_demo-office" data-gestures="greedy"></div>

Plans embedded before November 2026 zoomed on a plain scroll; they now scroll the page, unless they set data-gestures="greedy".

In 3D, the camera can turn slowly around the plan, about once a minute, until the visitor touches it. Choose it in the Publish dialog under Camera in 3D (Turn slowly), where your choice reaches your site on its next page load, or on one page with data-motion="orbit", which wins over it:

<div data-areaform="sp_demo-office" data-view="3d" data-motion="orbit"></div>

With data-motion="tour", the camera flies through the viewpoints saved on the level shown instead, staying a moment at each, round and round. With one viewpoint it flies there and then turns around it, and on a level without any it turns as orbit does.

<div data-areaform="sp_demo-office" data-view="3d" data-motion="tour"></div>

Either starts once the plan is drawn, and stops on the first click, tap, drag or key inside the plan; scrolling past it does not stop it. Picking another level or switching to 3D plays the motion for what is shown. It waits while the plan is off screen or the tab is hidden, and never moves for visitors who have asked their device for less motion. The 2D plan stays still.

In 3D, a Pause button beside the plan’s other buttons stops the camera, and Play moves it on from where it is; a tour goes on to its next viewpoint. After a click or a tap the camera stays still until Play, or until auto-resume moves it, below.

On a screen nobody reads for long, such as a kiosk or a screen on a stand, the camera can move again by itself after some seconds without anyone touching the plan. Give the seconds, at least 5, with data-motion-resume:

<div data-areaform="sp_demo-office" data-view="3d" data-motion="tour" data-motion-resume="60"></div>

It waits while a place’s card or a route is shown, and never moves again after someone pressed Pause.

With Directions on in the Publish dialog, visitors tap a place and get the walking route to it. To start them at a known point, such as the entrance where a QR code hangs, give that point with data-here on the snippet. The demo office has two entrances, entrance-a and entrance-b:

<div data-areaform="sp_demo-office" data-here="entrance-a"></div>

or with ?here= in the page’s address: https://your-site.example/plan?here=entrance-a. The value is a zone’s id, or a point on a level. The Editor gives both: select a zone, or use Here for visitors → Pick a point…, then Copy.

To open the plan on one place, such as a shop from your directory, give its zone’s id with data-to on the snippet or ?to= in the page’s address. The plan opens on that place’s level with its card showing. With a starting point as well, the route is drawn at once, across levels when it takes the lifts:

<div data-areaform="sp_demo-mall" data-here="p1-lobby-west" data-to="cinema"></div>

https://your-site.example/map?here=p1-lobby-west&to=cinema does the same, so a sign by the car park lifts can carry a QR code with the way to the cinema. In the demo shopping centre, that is the way from its underground car park, up by lift or stairs and escalator. With Directions off, the place is only highlighted. An id that names no zone in the plan is ignored, and data-to wins over ?to=.

Any zone can show a plan of its own inside it: a shop in a shopping centre, a flat in a house, a room in that flat, a container on a storage site. Visitors tap the zone and choose See inside; the button at the top, or the breadcrumb from two levels down, brings them back out. In the Editor, select the zone and choose Make a plan for this zone under Inside: the new plan opens with the zone’s shape, its name selected to change it. Or paste a plan’s link there and Fit to the zone.

Plans inside count apart from places: Free has 2, Starter 10, Pro 25 for each place and Business 50, and a pack adds 25 more for €5 a month. A plan inside has its own versions and Publish, and its own snippet and link, which open it inside its place. Make it a place, in This Space, lets it stand on its own on any site. On Business, a unit can also show a shop’s own plan from the shop’s own account. Plans inside zones tells the rest.

A plan you made for a unit stays yours. To let the shop keep it up to date, open People in the Editor and invite the shop’s person by e-mail. They can change the plan and save versions, but only you publish. A version they save shows as Waiting to publish until you publish it. The unit’s Inside also shows how many visitors went inside in the last 30 days.

To open the plan on a department inside a shop, give the department’s id with data-inside beside data-to, or ?inside= beside ?to=:

<div data-areaform="sp_demo-mall" data-to="unit-g06" data-inside="watches"></div>

In the demo, that is the watches in Volt, and Volt’s own site shows the same plan on its own. An id the shop’s plan doesn’t have is ignored, and data-inside wins over ?inside=.

Once the plan is drawn, the snippet’s element sends an areaform:ready event that bubbles up the page, for example to swap a picture for the plan:

<script>
document.addEventListener('areaform:ready', (event) => {
console.log('The plan is shown in', event.target);
});
</script>

Your page can move the plan’s camera itself, for example to fly through the building as a story scrolls by. Once areaform:ready has fired, the snippet’s element has an areaform property:

<div id="plan" data-areaform="sp_demo-office" data-view="3d"></div>
<script>
const el = document.getElementById('plan');
el.addEventListener('areaform:ready', async () => {
const { interrupted } = await el.areaform.flyTo('tour-3'); // The garden
if (!interrupted) el.areaform.lookAt('b3-z2'); // then turn to Room 3.2
});
</script>

It flies to viewpoints (flyTo), turns to zones (lookAt), follows the scroll (setProgress), changes level and tells your page when a zone is clicked. Moving the camera describes every method, option, coordinate and event, with recipes.

A kiosk by the entrance shows the plan full screen to one visitor after another. Four attributes make the snippet ready for one: every gesture to the plan, large buttons for a finger at arm’s length, the spot where the screen stands, and the seconds after which the plan starts over for the next visitor:

<div
id="plan"
data-areaform="sp_demo-mall"
data-gestures="greedy"
data-control-size="large"
data-here="entrance-north"
data-idle-reset="60"
style="height: 100%"
></div>

The seconds count from the last touch, click or key anywhere on the page, at least 5. Then the plan goes back to how it opened: its first floor and view, no route, “You are here” where data-here says. To show “Still here?” first, cancel the areaform:idle event and reset the plan yourself:

<script>
const el = document.getElementById('plan');
el.addEventListener('areaform:idle', (event) => {
event.preventDefault();
showStillHere(() => el.areaform.reset()); // your notice, then the reset
});
</script>

Your page’s own buttons can drive the plan through the same el.areaform: showPlace('unit-g03') draws the way to a shop from where the screen stands, focus(['unit-g03', 'unit-g08']) brings a category’s shops forward and fades the rest, and reset() starts over. On Business, kiosk screens come set up for you, with a welcome slideshow, category buttons and search: Linden Square’s kiosk is one. Run the page full screen, for example with chrome --kiosk <address>.

The plan’s buttons, route and background follow a few CSS variables. Set them on the snippet’s element, or on any element around it, and the plan takes your site’s colours. For one plan, a style attribute is enough:

<div data-areaform="sp_demo-office" style="--af-accent: #0f766e"></div>
<script src="https://cdn.areaform.app/v1/embed.js" async></script>

The pressed buttons, the route, the “You are here” pin and the place card’s main button turn teal.

To give every plan on your site the same look, put the variables in your stylesheet. In this example the plan sits on a cream page, and its background matches the page:

[data-areaform] {
--af-bg: #faf7f0; /* the plan's background in 2D and 3D, cards and panels */
--af-panel: #f1ece1;
--af-text: #2b2a26;
--af-muted: #7a7466;
--af-border: #ddd5c4;
--af-accent: #9a3412; /* pressed buttons, the route, "You are here" */
--af-radius: 10px; /* rounder buttons and cards */
}

Text on the accent is white. With a light accent, such as yellow, make it dark. A light accent is still hard to read where it is a line or text on the background, such as the route and the pressed 2D/3D button, so a darker shade of your brand colour usually works better:

[data-areaform] {
--af-accent: #facc15;
--af-on-accent: #1c1917;
}
Variable What it colours Default
--af-bg The plan’s background in 2D and 3D, the loader, buttons, cards, panels #ffffff
--af-panel The route panel’s buttons, and messages such as “This plan is not found” #f6f6f3
--af-text Text #232321
--af-muted Quieter text: floor groups, hints, “Made with Areaform” #77776f
--af-border Lines around buttons, cards and panels #deded8
--af-accent Pressed buttons, the route, “You are here”, the place card’s button #2f6fdb
--af-on-accent Text on the accent #ffffff
--af-radius Corners of buttons, cards and panels 6px

The names are stable: we won’t rename them. Keep the background light. The plan’s own colours, for its floor, walls and zones, stay the same and are made for a light page. In 3D the plan’s background is a light grey until you set --af-bg. The plan reads its background once, when it opens, so set it in your CSS and not from a script later.

The plan’s buttons and messages are in the visitor’s browser language when it is English, Polish, Ukrainian or Russian, and in English otherwise. Zone and level names show in the visitor’s language when you have written them in it, and in the plan’s default language otherwise.

Nothing beyond the plan. It sets no cookies, uses no trackers and stores nothing in the visitor’s browser, so your cookie banner, if you have one, needs no change.

Each page view of the plan is counted for your monthly view total, and so is each time a visitor opens a plan inside a zone. Only the numbers per plan and per day are kept. So that one address cannot use up your month, our server counts views per IP address for up to an hour, then forgets it.

Your page loads the plan from Areaform, so the visitor’s browser connects to us and to Cloudflare, which delivers it. Our Terms (5.3) ask you to say so in your privacy notice. You can use this text, changed to fit your own:

This page shows an interactive floor plan provided by Areaform (areaform.app). To show it, your browser loads the plan from Areaform’s servers through Cloudflare, which process your IP address to deliver it. Areaform counts how often the plan is viewed, keeping only totals per day; it holds your IP address for up to an hour to stop one address from inflating the count. The plan sets no cookies and stores nothing in your browser. See Areaform’s privacy policy: https://areaform.app/privacy/

If you put people’s details on a plan, such as exhibitors’ or tenants’ names and contacts, you decide what is on it and Areaform keeps it for you under the Data Processing Agreement.