Beta
Mapbox Search JS

Search box

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.

Private beta for Mapbox Search API

The Mapbox Search API is in private beta for worldwide coverage and in public beta for Japan. Unless you are part of the private beta program, the Mapbox Search API is only available for Japanese-language queries for locations in Japan.

Stay tuned for upcoming updates to Mapbox Search JS that will additionally enable use of publicly available Mapbox APIs.

<SearchBox> is a React component that provides an interactive search box, powered by the Mapbox Search API.

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

Internally, this wraps the <mapbox-search-box> element.

Parameters

Example

export function Component() {
const [value, setValue] = React.useState('');
return (
<form>
<SearchBox accessToken={<your access token here>} />
</form>
);
}

SearchBoxProps

Instance Members