YYonda UI Docs

MapView

Split-view map for search results — Airbnb / Booking.com pattern. Each property renders as a price-pill marker on an interactive Leaflet map. Selecting a property (from the list or the map) syncs both sides. SSR-safe: renders a loading skeleton on the server and only mounts the map client-side.

Usage notes

  • — Markers are custom price-pill divs (not default Leaflet pins) — matches the Booking.com / Airbnb visual language. Active marker gets brand-primary fill + scale-up.
  • — Presentational and controlled: parent owns activeId. Wire it to the list view so both sides stay in sync.
  • — When activeId changes, the map pans to that property automatically.
  • — Auto-fits to the bounds of all items on first render when center is omitted.
  • — SSR-safe: the Leaflet map only mounts client-side. Server render shows a "Loading map…" placeholder inside the wrapper.
  • — Uses OpenStreetMap tiles by default (free, no API key). Swap to Mapbox / MapTiler by forking the component if map polish matters more than the free tier.