@ideal-postcodes/address-finder
Version:
Address Finder JS library backed by the Ideal Postcodes UK address search API
61 lines (40 loc) • 2.1 kB
Markdown
<h1 align="center">
<img src="https://img.ideal-postcodes.co.uk/Address%20Finder%20Logo@3x.png" alt="Ideal Postcodes Address Finder JavaScript Library">
</h1>
> Find and autocomplete addresses with Address Finder
[](https://badge.fury.io/js/%40ideal-postcodes%2Faddress-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](https://github.com/ideal-postcodes/address-finder-bundled).

## Links
- [npm Module](https://www.npmjs.com/package/@ideal-postcodes/address-finder)
- [About Address Finder](https://ideal-postcodes.co.uk/address-finder)
- [Changelog](https://cdn.jsdelivr.net/npm/@ideal-postcodes/address-finder/CHANGELOG.md)
## Documentation
See our full documentation at [docs.ideal-postcodes.co.uk](https://docs.ideal-postcodes.co.uk/docs/address-finder)
## Quick Start
### Install
Add address-finder to your project via npm
```bash
npm install @ideal-postcodes/address-finder
```
### Instantiate
Instantiate Address Finder with [`AddressFinder.setup`](modules/address_finder_exports.html#setup).
```javascript
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