A headless React hook for Turkish addresses. Province, district, and neighbourhood are picked in a chain, the postal code comes from the neighbourhood, and the address is re-checked on the server.
Türkiye only: addresses from other countries are not included.
Address line
Builds up as you pick
Province → district → neighbourhood
Changing a level clears everything below it, in the hook and in your form. Which field is open and which is loading is worked out from the chain.
Picked or typed
Picking a neighbourhood fills in its postal code; typing a code fills in the province and district, and the neighbourhood too when the code has only one. A code that is not in the dataset is refused.
Checked against PTT monthly
81 provinces, 973 districts and 72,466 neighbourhoods from PTT, Türkiye’s postal service. An automated check runs every month and ships a new release when anything changes.
About 10 kB per visit
Province and district names ship with the package; a province’s neighbourhoods download only when it is picked. No setup needed.
Any UI library
Renders nothing. Works with a native select, shadcn/ui, Ant Design or your own component, and plugs straight into React Hook Form.
Never trust the client
resolveAddress re-checks a submitted address against the dataset and derives the postal code on the server.