{"_id":"@anil-labs/google-places-autocomplete-react","name":"@anil-labs/google-places-autocomplete-react","dist-tags":{"latest":"0.2.0"},"versions":{"0.2.0":{"name":"@anil-labs/google-places-autocomplete-react","version":"0.2.0","type":"module","description":"React address autocomplete component built on Google's Places API (New).","license":"MIT","author":"Er. Anil Kumar Thakur <anilkumarthakur60@gmail.com>","repository":{"type":"git","url":"git+https://github.com/anilkumarthakur60/google-places-autocomplete.git","directory":"packages/react"},"homepage":"https://github.com/anilkumarthakur60/google-places-autocomplete/tree/main/packages/react#readme","bugs":"https://github.com/anilkumarthakur60/google-places-autocomplete/issues","sideEffects":false,"main":"./dist/index.cjs","module":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"dependencies":{"@anil-labs/google-places-autocomplete-core":"^0.2.0"},"peerDependencies":{"react":">=18","react-dom":">=18"},"devDependencies":{"@testing-library/react":"^16.3.2","@types/react":"^19.2.17","@types/react-dom":"^19.2.3","@vitejs/plugin-react":"^6.0.3","jsdom":"^29.0.2","react":"^19.2.8","react-dom":"^19.2.8","tsup":"^8.5.1","typescript":"~6.0.0","vitest":"^4.1.10"},"publishConfig":{"access":"public"},"engines":{"node":">=20"},"scripts":{"clean":"rm -rf dist","build":"tsup && node scripts/check-dist.mjs","dev":"tsup --watch","test":"vitest run","test:watch":"vitest","typecheck":"tsc --noEmit","lint":"eslint ."},"_nodeVersion":"24.18.0","_id":"@anil-labs/google-places-autocomplete-react@0.2.0","dist":{"integrity":"sha512-KLq8X3uLeJyKaZ66eoNmH0aMXlNgYtGJn4E1ubax17+NC8f3RC2LecjOzjvohzxtbnYb3VPArfBOpcJ5Qz8RBQ==","shasum":"ec492d9ed6bedce1ace93e1a4421edea8ae65920","tarball":"https://registry.npmjs.org/@anil-labs/google-places-autocomplete-react/-/google-places-autocomplete-react-0.2.0.tgz","fileCount":9,"unpackedSize":52425,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCA1eouDR+q85ZwTahYOeCuoTD5iHKeFI3S4ECl+0uD6QIgOYw6fjwXZWgDTJa6AUvvgPOsM8hc0Luk5K4GIpbGrMA="}]},"_npmUser":{"name":"anilkumarthakur","email":"anilkumarthakur60@gmail.com"},"directories":{},"maintainers":[{"name":"anilkumarthakur","email":"anilkumarthakur60@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/google-places-autocomplete-react_0.2.0_1785342371896_0.19484689449540893"},"_hasShrinkwrap":false}},"time":{"created":"2026-07-29T16:26:11.691Z","0.2.0":"2026-07-29T16:26:12.040Z","modified":"2026-07-29T16:26:12.285Z"},"maintainers":[{"name":"anilkumarthakur","email":"anilkumarthakur60@gmail.com"}],"description":"React address autocomplete component built on Google's Places API (New).","homepage":"https://github.com/anilkumarthakur60/google-places-autocomplete/tree/main/packages/react#readme","repository":{"type":"git","url":"git+https://github.com/anilkumarthakur60/google-places-autocomplete.git","directory":"packages/react"},"author":"Er. Anil Kumar Thakur <anilkumarthakur60@gmail.com>","bugs":"https://github.com/anilkumarthakur60/google-places-autocomplete/issues","license":"MIT","readme":"# @anil-labs/google-places-autocomplete-react\n\nReact address autocomplete component built on Google's Places API (New).\n\n## Install\n\n```sh\nnpm install @anil-labs/google-places-autocomplete-react\n```\n\n## Usage\n\n```tsx\nimport { PlacesAutocomplete } from '@anil-labs/google-places-autocomplete-react'\nimport '@anil-labs/google-places-autocomplete-core/styles.css'\nimport type { PlaceDetails } from '@anil-labs/google-places-autocomplete-core'\n\nexport function App() {\n  return (\n    <PlacesAutocomplete\n      apiKey=\"YOUR_API_KEY\"\n      placeholder=\"Search for an address…\"\n      onSelect={(place: PlaceDetails) => console.log(place.formattedAddress)}\n      onError={(error) => console.error(error)}\n    />\n  )\n}\n```\n\nFull documentation: [React guide](https://anilkumarthakur60.github.io/google-places-autocomplete/guide/frameworks/react) · [getting started](https://anilkumarthakur60.github.io/google-places-autocomplete/guide/getting-started) (Google Cloud setup) · [API reference](https://anilkumarthakur60.github.io/google-places-autocomplete/api/core).\n\n## Props\n\nAll [`PlacesAutocompleteConfig`](https://anilkumarthakur60.github.io/google-places-autocomplete/api/core#placesautocompleteconfig) fields, plus `value`/`onValueChange` (controlled input), `onSelect`, `onError`, `placeholder`, `className`. `onSelect`/`onError` are always safe as fresh inline functions; other config is read once at mount — remount via a `key` prop to change it.\n\n## Headless usage\n\n`usePlacesAutocomplete` — the hook the component is built on (`useSyncExternalStore` under the hood) — is also exported, for custom markup.\n\n## License\n\nMIT © Er. Anil Kumar Thakur\n","readmeFilename":"","_rev":"1-a99e664cba68f7e3faa7d5109e1063cd"}