naay.xyz
← All projects

Open Source · 2025

Thai Zip

Autocomplete Thai addresses from province to district, subdistrict, and postal code.

TypeScriptnpmReact
Loading Thai address demo

The problem

Thai address forms need a fast, forgiving way to turn a partial search into a complete province, district, subdistrict, and postal code.

What I built

Thai Zip is an npm package for fast, fuzzy Thai address search. It provides autocomplete from province to district, subdistrict, and postal code, with Thai and English address data.

Technical decisions

The core npm package is thaizip; react-thaizip is the React/Next.js CLI that scaffolds source code into a project. The headless API keeps the address search independent from any UI framework.

Outcome

Typing “ลาดพร้าว” returns formatted Thai address suggestions, including the subdistrict, district, province, and postal code. The core package can be installed with npm i thaizip.

What I learned

Reusable address behavior is valuable when it can be shared across Thai checkout forms instead of rebuilt in each application. A small, documented core API makes that behavior easy to integrate and test.