InfoWindow

Renders an InfoWindow

API Reference

Props

PropertyDefaultType/Description
anchor-google.maps.AdvancedMarkerElement
Anchors the InfoWindow to a Marker. position is not required if anchor is used.
ariaLabel-string
The aria-label attribute for the InfoWindow.
class-string
The class name of the Marker Content. Only applicable to HTML content.
disableAutoPanfalseboolean
If true, the InfoWindow will not pan the map when opened.
headerContent-string | JSX.Element
The content of the InfoWindow header.
headerDisabledfalseboolean
If true, the InfoWindow header will be disabled.
maxWidth-string
The maximum width of the InfoWindow.
minWidth-string
The minimum width of the InfoWindow.
openfalseboolean
If true, the InfoWindow will be open.
pixelOffset-[number, number]
The offset from the marker's position to the tip of an InfoWindow that has been opened with the marker.
position-google.maps.LatLngLiteral
The marker's position.
shouldFocusfalseboolean
If true, the InfoWindow will focus on mount.
style-JSX.CSSProperties
The style of the Marker Content. Only applicable to HTML content.
zIndex-number
The marker's zIndex.

Events

Event NameType/Description
onClose() => void
Fired when the InfoWindow is closed.
onCloseClick() => void
Fired when the close button is clicked.
onOpenChange(open: boolean) => void
Fired when the InfoWindow open state changes.