Address Autofill
Address Autofill is a Mapbox Search JS feature that makes filling out postal addresses on web forms faster, easier, and more accurate. It presents the user with suggested address matches after they begin typing in your form. Users can click a suggested address and instantly fill in the remaining inputs (city, state, postal code, etc).
Address autofill allows users to enter their information with fewer keystrokes and provide more accurate information.
Demo
Use this fully-functional example to see how Address Autofill adds an interactive search experience to an address form.
This example uses the autofill()
function to automatically add suggestions to an address input.
Get started
See our Quickstart guides to learn how to install the correct framework and add Address Autofill to your project:
- Web - Rich UI web components and JavaScript functions ready to drop into any webpage
- React - Modern React components and hooks wrapping functionality from the standard web components
Address Confirmation & Minimap
With Mapbox Search JS libraries and components, the checkout process can be further enriched:
- Address confirmation lets users match their address against our comprehensive database and presents a confirmation dialog.
- A Minimap component provides visual confirmation of an address and allows address pin adjustments that improve the delivery experience.
API Reference Docs
Full reference documentation for this feature's HTML custom elements, properties, options, components, and hooks are available:
- Web Reference - Address Autofill
- React Reference - Address Autofill
- Core Reference - Address Autofill
Advanced Usage (Build your own UI)
For interacting with the Autofill API service in a JavaScript or Node environment, you can use the Mapbox Search JS Core Framework.
If you target iOS and Android devices, use our Mobile SDKs with ready-made app examples: