Popups

Anchored popup content for map coordinates or marker interactions.

<MapPopup longitude={121.5654} latitude={25.033} closeButton>Taipei 101</MapPopup>

Installation

pnpm add @notion-kit/map

API Reference

MapPopup

Creates a popup anchored to map coordinates and renders React content into the MapLibre popup container.

MapPopup extends MapLibre PopupOptions.

PropTypeDefaultDescription
longitude*number-Popup longitude.
latitude*number-Popup latitude.
onClose() => void-Called when the popup closes.
closeButtonbooleanfalseShows the Notion Kit close button.

MapPopupClose

Renders the close button used inside coordinate popups and marker popups. You usually get it by passing closeButton, but it can be used directly in custom popup content.

PropTypeDefaultDescription
onClick*() => void-Called when the button is used.