Skip to content

shadcn.io is an independent project built on shadcn/ui

Open Houses Tour Map Block for React

Melbourne open houses on a live map: add homes to a tour driven along real roads, see each drive and clash in words, and save the day as a calendar file.

On this page5 sections

Preview

Preview width

Installation

Part of Pro
Pro unlocks the code and one-line install of every Pro button and text effect, plus the MCP for your AI editor.
Have Pro already? Sign in to open it.Opens here as soon as you're Pro.

Overview

Plan a weekend of viewings without double-booking yourself, with this open houses tour map for React with Base UI. Openlatch, an open-house planner, puts seven homes for sale in Melbourne's inner north, from Princes Hill to Westgarth, each on a real street of its suburb on a live Map that follows your theme, light or dark, with a 30-minute inspection on Saturday, Sunday or both. A Toggle Group floating over the map picks the day, and a row of cards under it lists that day's homes in time order, each with a Checkbox that adds it to the tour. The tour is worked out stop by stop: 20 minutes at each home, the drive to the next along the roads, and 5 minutes to park. The legs follow real road routes, numbered pills mark the stops, and a home you'd reach with less than 10 minutes of its inspection left is a clash, said in words on its card and drawn as a dashed leg. Three cells count the viewings, the minutes on the road and the clashes, and the header's Shine Button saves the day's tour as a calendar file. Built from Map, Toggle Group, Checkbox, Shine Button and Guides. For buyers' agents, property portals and anyone with a Saturday of inspections.

FAQ

When is a home a clash?

stopsOf walks the tour in time order. You start at the first home when it opens, stay 20 minutes, then drive to the next and take 5 minutes to park; if you'd arrive with less than 10 minutes of its 30-minute inspection left, it's a clash and you carry on from there without looking round. On Saturday the starting tour runs late at Northcote; drop Brunswick East and it fits.

Where do the drive times and roads come from?

From the public OSRM router, asked once while the block was written and baked in: DRIVE holds the road time between every pair of homes, padded by 40 percent for weekend traffic, and LEGS holds each leg's route, simplified to a few corners. Nothing is routed while the block runs, so the times are a fair guess, not live traffic.

What does Download plan save?

A calendar file (.ics) of the chosen day's tour, one event per stop with its time, suburb and the line from its card, made in the page and saved by the browser. With an empty tour the button says so instead of saving. Nothing is booked or sent to an agent.

What is real, and what stays local?

The streets and suburbs are real; Openlatch, the homes, their price guides and the inspection times are invented sample data, and no real address is used. Adding homes and switching days change local state only. The map tiles are the one thing loaded, from CARTO's basemaps over OpenStreetMap data, with their credit kept in the corner.

Can I use it without a mouse?

Yes. The days are a toggle group, every home's card has a checkbox named by its time and suburb, and Download plan and the zoom buttons work from the keyboard; the map itself takes the arrow keys and plus and minus once focused. Pressing a pill on the map does what its checkbox does, and a polite message gives the viewings, driving and clashes once the ticks settle.

How does it look on a phone?

Download plan sits under the heading, the day toggle floats over the map, the three cells keep one row and the cards scroll sideways, snapping one at a time. Each card keeps the same height whatever it says, so ticking and switching days never move the page.