Checkout & Address Verification
Checkout forms lose conversions when shoppers have to type full street addresses on mobile, and fulfillment teams lose money when typos or wrong cities slip into shipping labels. Traditional autocomplete services solve part of that problem, but charge per session, require managing API keys, and send every customer's home address to a third-party server.
With texspace, you drop a single web component or React input into any existing <form>. Shoppers get instant global address suggestions biased to their city, automatic autofill for city, state, postal code, and country fields, and rooftop deliverability verification — all running privately inside the browser with $0/mo usage fees.
What this solves#
- Faster checkout completion: Suggests exact streets and rooftop numbers from the first few keystrokes and populates every sibling form field automatically.
- Fewer failed deliveries: Extracts apartment/suite numbers (
Apt 4B), corrects spelling mistakes (4865 Mision St), verifies whether a house number resolves to an exact parcel or rooftop, and flags wrong-city mismatches before the order is placed. - Zero customer PII sent to third-party APIs: Address lookups happen locally in the browser against anonymous static data files — no external server logs what your customer typed.
- No API keys or usage caps: Works in plain HTML, React, Next.js, Vue, Svelte, Shopify, Webflow, Rails, or Django with zero backend setup.
Quick Drop-In Example#
<script type="module" src="https://cdn.jsdelivr.net/npm/texspace/element.js"></script>
<form id="shipping-form">
<texspace-address-input
name="address1"
verify
placeholder="Start typing your shipping address..."
></texspace-address-input>
<input name="address2" autocomplete="shipping address-line2" placeholder="Apt / Suite" />
<input name="city" autocomplete="shipping address-level2" placeholder="City" />
<input name="state" autocomplete="shipping address-level1" placeholder="State / Region" />
<input name="zip" autocomplete="shipping postal-code" placeholder="Postal code" />
<input name="country" autocomplete="shipping country-name" placeholder="Country" />
</form>
<script>
document.querySelector("texspace-address-input").addEventListener("texspace:select", (e) => {
const { addressLine1, city, region, postcode, deliverable, conflictingTokens } = e.detail;
console.log({ addressLine1, city, region, postcode, deliverable, conflictingTokens });
});
</script>"use client";
import { useState } from "react";
import { TexspaceAddressInput, type TexspaceAddressDetail } from "texspace/react";
export function ShippingForm() {
const [selected, setSelected] = useState<TexspaceAddressDetail | null>(null);
return (
<form>
<TexspaceAddressInput
verify
geoip={true}
theme="auto"
placeholder="Start typing your shipping address..."
onSelect={(detail) => setSelected(detail)}
/>
<input name="apt" autoComplete="shipping address-line2" placeholder="Apt / Suite" />
<input name="city" autoComplete="shipping address-level2" placeholder="City" />
<input name="state" autoComplete="shipping address-level1" placeholder="State / Region" />
<input name="zip" autoComplete="shipping postal-code" placeholder="Postal code" />
<input name="country" autoComplete="shipping country-name" placeholder="Country" />
{selected && (
<p>
{selected.deliverable ? "Deliverable address" : "Please double-check street number"}
{selected.conflictingTokens.length > 0 && ` (corrected: ${selected.conflictingTokens.join(", ")})`}
</p>
)}
</form>
);
}Type an address (or click a sample) to test real autocomplete, automatic sibling form autofill, unit extraction, and deliverability verification running locally in WebAssembly.
{
"tip": "Start typing a global address on the left — sibling inputs autofill automatically."
}
Automatic Form Autofill#
When autofill is enabled (the default), selecting a suggestion populates sibling <input> and <select> elements inside the same <form> and dispatches both input and change events so React, Vue, Alpine, or native form validation stay in sync.
Use standard HTML autocomplete attributes (with or without shipping/billing prefixes) or explicit data-texspace attributes:
| Address Field | Standard autocomplete token | data-texspace attribute |
|---|---|---|
| Street line 1 | address-line1, street-address | address-line1 |
| Apt / Suite / Unit | address-line2 | address-line2, unit |
| City / Locality | address-level2 | city, locality |
| State / Region | address-level1 | region, state |
| Postal / ZIP code | postal-code | postcode, zip |
| Country | country-name, country | country |
| Latitude / Longitude | — | lat, lon |
| Parcel APN | — | apn |
Configuration Options & Events#
| Attribute / Prop | Default | Description |
|---|---|---|
verify | false | Runs full deliverability verification on selection (populates deliverable, status, formattedLines, corrections, conflictingTokens, and apn). |
autofill | true | Automatically fills sibling form inputs inside the enclosing <form>. |
geoip | "auto" | Automatically biases suggestions toward the visitor's city and pre-warms their local region. Pass "off" to disable or provide your own GeoIP endpoint. |
focus | — | Explicit proximity center ("37.4419,-122.1430" in HTML, [37.4419, -122.1430] in React). Overrides automatic GeoIP. |
theme | "auto" | "auto" (follows system dark/light preference), "light", or "dark". |
limit | 5 | Maximum number of suggestions shown in the dropdown. |
debounce / debounceMs | 120 | Milliseconds to wait after typing pauses before searching. |
src | Public CDN | Point to your own self-hosted data URL or a single state/region file. |
Events#
texspace:select(onSelect) — Fires when a user chooses an address or presses Enter. Payload isTexspaceAddressDetail.texspace:results(onResults) — Fires whenever suggestions arrive.texspace:geoip(onGeoip) — Fires once visitor city focus resolves ({ city, region, lat, lon }).texspace:clear(onClear) — Fires when the input is cleared.texspace:error(onError) — Fires if a network request fails.
Matching Your Brand Styling#
Customize colors, borders, radius, and typography with standard CSS custom properties:
texspace-address-input {
--tx-bg: #ffffff;
--tx-surface: #f8fafc;
--tx-border: #d0d7de;
--tx-border-focus: #2563eb;
--tx-text: #0f172a;
--tx-muted: #64748b;
--tx-accent: #2563eb;
--tx-radius: 8px;
--tx-font: "Inter", system-ui, sans-serif;
}Want to see a complete checkout experience with real form autofill, GeoIP bias, and conflict badges? Open the interactive playground at texspace.dev/checkout.
Go Deeper#
- Address Search, Typo Handling & Verification — Learn how deliverability grades and conflict detection work.
- JavaScript & TypeScript SDK Reference — Full
TexspaceAddressDetailanduseTexspace()TypeScript types. - Hosting & Deployment — Self-host on your own CDN or add
geo.warm()for instant first keystrokes.