API Reference

PreviousNext

Complete API reference for the PlaceAutocomplete component.

Place Autocomplete

Provides a searchable input field that queries the Photon geocoding API to find places, addresses, and points of interest.

Props

PropTypeDescription
onPlaceSelect(feature: PlaceFeature) => voidOptional. Callback fired when a place is selected from the results.
onResultsChange(results: PlaceFeature[]) => voidOptional. Callback fired when search results change.
debounceMsnumberOptional. Debounce delay in milliseconds before triggering a search. Defaults to 300.
langstringOptional. Preferred language for results (e.g., "en", "de", "fr").
limitnumberOptional. Maximum number of results to return. Defaults to 5.
bbox[number, number, number, number]Optional. Bounding box to restrict results: [minLongitude, minLatitude, maxLongitude, maxLatitude].
latnumberOptional. Latitude used to bias results toward a specific location.
lonnumberOptional. Longitude used to bias results toward a specific location.
zoomnumberOptional. Zoom level used for location biasing. Higher values increase locality.
locationBiasScalenumberOptional. Strength of the location bias.
...propsOmit<React.ComponentProps<"input">, "value" | "onChange">All other standard input element props.