Find and autocomplete addresses with Address Finder
@ideal-postcodes/address-finder
is a JavaScript library that delivers address autocomplete (or address typeahead) search functionality on a webpage.
This package should be consumed by a bundler or transpiler (e.g. webpack, parcel, rollup) for minification, module resolution and specific browser support.
For a pre-bundled version of address-finder
(minified, transpiled, polyfilled, etc) that can immediately be dropped on a webpage, use address-finder-bundled.
See our full documentation at docs.ideal-postcodes.co.uk
Add address-finder to your project via npm
npm install @ideal-postcodes/address-finder
Instantiate Address Finder with AddressFinder.setup
.
import { AddressFinder } from "@ideal-postcodes/address-finder";
const controller = AddressFinder.setup({
apiKey: "ak_test", // API Key from your account
// Target fields to send selected Address information
// using CSS selectors
outputFields: {
line_1: "#line_1", // Address Finder will attach to line_1
line_2: "#line_2",
line_3: "#line_3",
post_town: "#post_town",
postcode: "#postcode",
},
});
Copyright © IDDQD Limited