Skip to main content

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.

Parameters

Example

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

SearchBoxProps

Instance Members

Was this section on SearchBoxProps helpful?
Was this section on SearchBoxRefType helpful?
Was this page helpful?