Setting this to a single country will disable country selection and hide the country selection toolbar
Loading...
<form>
<label for="line_1">Address First Line</label>
<input type="text" id="line_1" />
<label for="line_2">Address Second Line</label>
<input type="text" id="line_2" />
<label for="city">City</label>
<input type="text" id="city" />
<label for="state">State</label>
<input type="text" id="state" />
<label for="zipcode">Zip Code</label>
<input type="text" id="zipcode" />
</form>
import { AddressLookup } from "@addresszen/address-lookup";
AddressLookup.setup({
apiKey: "ak_test",
detectCountry: false,
restrictCountries: ["USA"],
outputFields: {
line_1: "#line_1",
line_2: "#line_2",
city: "#city",
state: "#state",
zip_plus_4_code: "#zipcode",
},
});