@ideal-postcodes/address-finder
v5.1.3
Published
Address Finder JS library backed by the Ideal Postcodes UK address search API
Downloads
22,863
Maintainers
Readme
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.
Links
Documentation
See our full documentation at docs.ideal-postcodes.co.uk
Quick Start
Install
Add address-finder to your project via npm
npm install @ideal-postcodes/address-finder
Instantiate
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",
},
});
Licence
Copyright © IDDQD Limited