All docschevron-rightMapbox Search JSchevron-rightarrow-leftReact Referencechevron-rightSearch Box

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.

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

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

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



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


Instance Members