AutoSuggest Component | what3words

AutoSuggest Component

To add a what3words field with AutoSuggest into your website (we call this the AutoSuggest Component), follow these simple instructions:

1
Get an API Key

You will need a valid API key in order to use this component within your website.

2
Add what3words.js script to your website header

Add this snippet of code between the <head></head> tags.

<script src="https://assets.what3words.com/sdk/v3.1/what3words.js?key=YOUR-API-KEY"></script>
Copied

3
Customise the AutoSuggest Component

Focus on coordinates
(autosuggest-focus)
Clip to bounding box
(clip-to-bounding-box)
Clip to polygon
(clip-to-polygon)
Clip to circle
(clip-to-circle)
1
Clip to country
(clip-to-country)
Placeholder
(placeholder)

4
Add this snippet of code into the site body where you would like the what3words field to appear:

<what3words-autosuggest  />
Copied

Using an e-commerce platform? Try one of our plugins instead…

Back to top