{"id":44517945,"url":"https://github.com/buildingwatsize/thai-address-autocomplete-react","last_synced_at":"2026-02-13T17:28:12.535Z","repository":{"id":84433517,"uuid":"336145193","full_name":"buildingwatsize/thai-address-autocomplete-react","owner":"buildingwatsize","description":"Thai-address-autocomplete-react is an Input Component for React can auto-complete thailand address with a magic by `just type something`","archived":false,"fork":false,"pushed_at":"2025-09-15T05:11:41.000Z","size":2781,"stargazers_count":25,"open_issues_count":0,"forks_count":7,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-14T10:16:27.016Z","etag":null,"topics":["autocomplete","react","thai","thai-address"],"latest_commit_sha":null,"homepage":"https://thai-address-autocomplete-react.vercel.app","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/buildingwatsize.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"buildingwatsize","patreon":null,"open_collective":null,"ko_fi":"watsize","tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"lfx_crowdfunding":null,"polar":null,"buy_me_a_coffee":"watsize","thanks_dev":null,"custom":null}},"created_at":"2021-02-05T02:49:02.000Z","updated_at":"2025-09-15T05:11:45.000Z","dependencies_parsed_at":"2024-01-10T05:42:37.152Z","dependency_job_id":"3c26b6bf-b106-4c16-bc0a-e3280162d0c0","html_url":"https://github.com/buildingwatsize/thai-address-autocomplete-react","commit_stats":{"total_commits":3,"total_committers":1,"mean_commits":3.0,"dds":0.0,"last_synced_commit":"985091f1b7fe2e9c1b2ab31e59be8955fc53d1ec"},"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/buildingwatsize/thai-address-autocomplete-react","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/buildingwatsize%2Fthai-address-autocomplete-react","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/buildingwatsize%2Fthai-address-autocomplete-react/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/buildingwatsize%2Fthai-address-autocomplete-react/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/buildingwatsize%2Fthai-address-autocomplete-react/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/buildingwatsize","download_url":"https://codeload.github.com/buildingwatsize/thai-address-autocomplete-react/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/buildingwatsize%2Fthai-address-autocomplete-react/sbom","scorecard":{"id":257695,"data":{"date":"2025-08-11","repo":{"name":"github.com/buildingwatsize/thai-address-autocomplete-react","commit":"f91aa93f57dc0823fe42a50134284f4f95adba44"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.5,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Code-Review","score":0,"reason":"Found 0/15 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Maintained","score":4,"reason":"4 commit(s) and 1 issue activity found in the last 90 days -- score normalized to 4","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":0,"reason":"license file not detected","details":["Warn: project does not have a license file"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":6,"reason":"SAST tool is not run on all commits -- score normalized to 6","details":["Warn: 4 commits out of 6 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":9,"reason":"1 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-17T10:04:04.734Z","repository_id":84433517,"created_at":"2025-08-17T10:04:04.734Z","updated_at":"2025-08-17T10:04:04.734Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29413255,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-13T06:24:03.484Z","status":"ssl_error","status_checked_at":"2026-02-13T06:23:12.830Z","response_time":78,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["autocomplete","react","thai","thai-address"],"created_at":"2026-02-13T17:28:11.955Z","updated_at":"2026-02-13T17:28:12.529Z","avatar_url":"https://github.com/buildingwatsize.png","language":"TypeScript","funding_links":["https://github.com/sponsors/buildingwatsize","https://ko-fi.com/watsize","https://buymeacoffee.com/watsize"],"categories":[],"sub_categories":[],"readme":"# thai-address-autocomplete-react\n\n[![NPM](https://img.shields.io/npm/v/thai-address-autocomplete-react)](https://www.npmjs.com/package/thai-address-autocomplete-react)\n[![NPM](https://img.shields.io/badge/Watsize-Library-289548)](https://www.npmjs.com/package/thai-address-autocomplete-react)\n[![Downloads](https://img.shields.io/npm/dm/thai-address-autocomplete-react.svg)](https://npmjs.org/package/thai-address-autocomplete-react)\n\n## 🎉 RELEASE v1 🎉\n\nGet back to active!. I hope this library will be useful for all you guy. Welcome all PR as always. Thanks.\n\n## 📘 About\n\nthai-address-autocomplete-react is an input component for ReactJS that can auto-complete Thai addresses with magic by `just typing something`. Anyway I hope this component will be a useful thing to you. :D Happy Coding.\n\n## ⚙ Install\n\n```bash\nnpm install thai-address-autocomplete-react\n# or just `yarn add thai-address-autocomplete-react`\n```\n\n## 📌 Example Usage\n\n```tsx\nimport { useState } from \"react\";\nimport { Address, CreateInput } from \"thai-address-autocomplete-react\";\n\nconst InputThaiAddress = CreateInput();\n\nconst App = () =\u003e {\n  const [address, setAddress] = useState\u003cAddress\u003e({\n    district: \"\", // ตำบล tambol\n    amphoe: \"\", // อำเภอ amphoe\n    province: \"\", // จังหวัด changwat\n    zipcode: \"\", // รหัสไปรษณีย์ postal code\n  });\n\n  const handleChange = (scope: string) =\u003e (value: string) =\u003e {\n    setAddress((oldAddr: Address) =\u003e ({\n      ...oldAddr,\n      [scope]: value,\n    }));\n  };\n\n  const handleSelect = (address: Address) =\u003e {\n    setAddress(address);\n  };\n\n  return (\n    \u003cdiv\u003e\n      \u003clabel\u003eตำบล\u003c/label\u003e\n      \u003cInputThaiAddress.District\n        value={address[\"district\"]}\n        onChange={handleChange(\"district\")}\n        onSelect={handleSelect}\n      /\u003e\n      \u003clabel\u003eอำเภอ\u003c/label\u003e\n      \u003cInputThaiAddress.Amphoe\n        value={address[\"amphoe\"]}\n        onChange={handleChange(\"amphoe\")}\n        onSelect={handleSelect}\n      /\u003e\n      \u003clabel\u003eจังหวัด\u003c/label\u003e\n      \u003cInputThaiAddress.Province\n        value={address[\"province\"]}\n        onChange={handleChange(\"province\")}\n        onSelect={handleSelect}\n      /\u003e\n      \u003clabel\u003eรหัสไปรษณีย์\u003c/label\u003e\n      \u003cInputThaiAddress.Zipcode\n        value={address[\"zipcode\"]}\n        onChange={handleChange(\"zipcode\")}\n        onSelect={handleSelect}\n      /\u003e\n    \u003c/div\u003e\n  );\n};\n\nexport default App;\n```\n\n## 📋 Properties\n\n### Label description\n\n| Data label | Data field name |\n|------------|-----------------|\n| ตำบล/แขวง  | district        |\n| อำเภอ/เขต  | amphoe          |\n| จังหวัด      | province        |\n| รหัสไปรษณีย์  | zipcode         |\n\n### Component properties\n\n| **Property**          | **Description**                                                                                       | **Type**                                                          | **Default** |\n|-----------------------|-------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------|-------------|\n| **scope**             | field name from record. Possible value will be \"district\", \"amphoe\", \"province\", and \"zipcode\".       | _string_                                                          | \"province\"  |\n| **delimiter**         | delimiter between scope values, which will show inside options in the autocomplete.                   | _string_                                                          | \", \"        |\n| **value**             | value by scope.                                                                                       | _string_                                                          | \"\"          |\n| **filter**            | array filter function, used for fine grain result of options or fixed something on the result.        | _(value?: Address, index?: number, array?: Address[]) =\u003e boolean_ | () =\u003e true  |\n| **onChange**          | function callback, trigger on input changes.                                                          | _(value: string) =\u003e void_                                         | () =\u003e null  |\n| **onSelect**          | function callback, trigger on select the option.                                                      | _(address: Address) =\u003e void_                                      | () =\u003e null  |\n| **style**             | \"Fashions fade, style is eternal.\" — Yves Saint Laurent                                               | _CSS.Properties_                                                  | {}          |\n| **className**         | css class...name.                                                                                     | _string_                                                          | \"\"          |\n| **autoCompleteProps** | the override properties of AutoComplete: check out `https://ant.design/components/auto-complete#api`. | _AutoCompleteProps_                                               | {}          |\n\n### Data record (also named `Address`)\n\n\u003e the data record can be found `onSelect`.\n\n```typescript\ninterface Address {\n  district: string;\n  amphoe: string;\n  province: string;\n  zipcode: number;\n}\n```\n\n## 📝 Need More Example?\n\n- Example Project: [./example](./example)\n- more Document: [./docs](./docs/README.md)\n- Online Demo: [Demo](https://thai-address-autocomplete-react-watsize.vercel.app)\n- or Online Editor (JavaScript): [StackBlitz](https://stackblitz.com/edit/thai-address-autocomplete-react-demo-javascript?file=src%2FApp.jsx)\n- or Online Editor (TypeScript): [StackBlitz](https://stackblitz.com/edit/thai-address-autocomplete-react-demo-typescript?file=src%2FApp.jsx)\n\n## 🙋 FAQ?\n\nFAQ 1: **Can I use custom database ?**\n\nYes, but to use custom database (in this version). It supports only `JSON format` file that output from [Database Tools by earthchie](https://github.com/earthchie/jquery.Thailand.js/tree/master?tab=readme-ov-file#ต้องการปรับปรุงฐานข้อมูล).\n\n```typescript\n// 1. import json\nimport customDB from \"./database/db.json\";\n\n// 2. used by put in the configuration before initialize component\nconst InputCustom = CreateInput({ database: customDB });\n```\n\nFAQ 2: **I want to ask you more.**\n\nI provide a simple document on [./docs](./docs/README.md) to describe how to use this library.\n\nBut if you're not found what you want to know, please feel free to create an issue on GitHub. I would love to answer all of the questions, and I am also welcome for all the PR. ❤️\n\n## 𝌡 Changelog\n\nPlease see more [CHANGELOG.md](CHANGELOG.md)\n\n## License\n\nMIT © [buildingwatsize](https://github.com/buildingwatsize)\n\n## ⚒ Thanks a lot\n\n- Base component:\n  - [ant-design/auto-complete](https://ant.design/components/auto-complete)\n- Amazing ideas:\n  - [earthchie/jquery.Thailand.js](https://github.com/earthchie/jquery.Thailand.js)\n  - [Sellsuki/thai-address-database](https://github.com/Sellsuki/thai-address-database)\n  - [zapkub/react-thailand-address-typeahead](https://github.com/zapkub/react-thailand-address-typeahead)\n  - [winChawakorn/react-thailand-address-autocomplete](https://github.com/winChawakorn/react-thailand-address-autocomplete)\n  - [saintent/react-thailand-address](https://github.com/saintent/react-thailand-address)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbuildingwatsize%2Fthai-address-autocomplete-react","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbuildingwatsize%2Fthai-address-autocomplete-react","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbuildingwatsize%2Fthai-address-autocomplete-react/lists"}