Skip to main content

Geocoding

Public beta for Mapbox Search JS

Mapbox Search JS is in public beta. During the public beta phase, frameworks may be subject to potential changes as they stabilize.

Geocoder

<Geocoder> is a React component that provides an interactive geocoder, powered by the Mapbox Geocoding API.

To use this element, you must have a Mapbox access token.

Internally, this wraps the <mapbox-geocoder> element.

Parameters

Example

export function Component() {
const [value, setValue] = React.useState('');
return (
<form>
<Geocoder accessToken={<your access token here>} />
</form>
);
}
Was this section on Geocoder helpful?

GeocoderProps

Instance Members

Was this section on GeocoderProps helpful?
Was this section on GeocoderRefType helpful?
Was this page helpful?