StealThis .dev

Travel — Map + Content Split

A showcase-grade Airbnb-style split layout for the fictional coast of Cala Verdana — a scrollable column of point-of-interest cards on the left and a sticky, fly-to SVG map on the right. Hovering or selecting a card highlights its numbered pin and the map pans and zooms to centre it; selecting a pin scrolls the matching card into view and floats a preview popover. A category chip bar, price slider, search field and saved filter narrow both panes in sync, with a heart-driven trip planner and a mobile list-or-map toggle.

Open in Lab
html css vanilla-js
Targets: JS HTML

Code

Map + Content Split

A two-pane discovery layout for the invented coastline of Cala Verdana, built in the spirit of an Airbnb or booking map view. The left pane scrolls through point-of-interest cards — stays, eats, beaches, trails and sights — each pairing a gradient “photo”, a star rating, a price tier, a best-time badge and a save heart. The right pane is a sticky map rendered entirely from layered inline SVG and CSS gradients: a coastline, hills, a dashed coast road and one numbered teardrop pin per place.

The two panes stay in sync no matter which you reach for. Hovering a card lights up its pin; hovering a pin floats a small preview popover anchored in screen space. Selecting either one makes it the active place — the card gains a coral ring, the pin scales up, and the map “flies” by panning and zooming its SVG canvas via a CSS transform so the selection sits centred. Choosing a pin also scrolls the matching card into view. Pins are real keyboard-operable buttons, so focus and selection travel through the map as easily as through the list.

A filter bar narrows both panes at once: category chips, a maximum-price slider, a free-text search and a “Saved” toggle all run through one matcher that shows or hides cards and pins together and updates the live result count. Tapping a heart drops a place into your trip with a toast, and dedicated zoom controls plus a reset button round out the map. On narrow screens the split collapses to a single column with a topbar toggle that swaps between the full list and the full map, staying usable down to about 360px.

Illustrative travel UI only — fictional destinations, prices, and maps.