All integrations·Framework examples

Plain HTML

Active

No build step, no framework. One HTML file, three script lines, working autocomplete.

Install

CDN
<script src="https://cdn.postio.co.uk/v1/address-finder.js"></script>

30-second example

<!doctype html>
<html lang="en">
  <body>
    <input id="address-search" placeholder="Start typing an address…" />
    <input id="line1" placeholder="Address line 1" />
    <input id="town" placeholder="Town / City" />
    <input id="postcode" placeholder="Postcode" />

    <script src="https://cdn.postio.co.uk/v1/address-finder.js"></script>
    <script>
      Postio.AddressFinder.setup({
        apiKey: "pk_…",
        input: "#address-search",
        output: {
          address_line_1: "#line1",
          post_town:      "#town",
          postcode:       "#postcode",
        },
      });
    </script>
  </body>
</html>