{"id":16454656,"url":"https://github.com/opengeekslab/react-native-google-places-autocomplete","last_synced_at":"2025-07-04T10:34:00.612Z","repository":{"id":80261747,"uuid":"100963229","full_name":"openGeeksLab/react-native-google-places-autocomplete","owner":"openGeeksLab","description":null,"archived":false,"fork":false,"pushed_at":"2017-08-22T08:17:41.000Z","size":22,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-26T22:28:16.936Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/openGeeksLab.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2017-08-21T14:57:08.000Z","updated_at":"2017-08-21T14:58:48.000Z","dependencies_parsed_at":null,"dependency_job_id":"dee4bf98-f612-4296-b031-8893fdc9578a","html_url":"https://github.com/openGeeksLab/react-native-google-places-autocomplete","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/openGeeksLab/react-native-google-places-autocomplete","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openGeeksLab%2Freact-native-google-places-autocomplete","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openGeeksLab%2Freact-native-google-places-autocomplete/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openGeeksLab%2Freact-native-google-places-autocomplete/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openGeeksLab%2Freact-native-google-places-autocomplete/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/openGeeksLab","download_url":"https://codeload.github.com/openGeeksLab/react-native-google-places-autocomplete/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openGeeksLab%2Freact-native-google-places-autocomplete/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263493374,"owners_count":23475184,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2024-10-11T10:19:33.865Z","updated_at":"2025-07-04T10:34:00.586Z","avatar_url":"https://github.com/openGeeksLab.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# react-native-google-places-autocomplete\nCustomizable Google Places autocomplete component for iOS and Android React-Native apps\n\n### Changelog\n- 1.2.12 : Fixed render description + docs.\n- 1.2.11 : Fixed current location result `onPress` event.\n- 1.2.10 : Set default `debounce` to `0`. Fixed debounce typing lag.\n- 1.2.9 : Added `isRowScrollable` prop.\n- 1.2.8 : Added `underlineColorAndroid`, `listUnderlayColor`, `renderLeftButton`, `renderRightButton` props. Added `nearbyPlacesAPI` option `None`.\n- 1.2.7 : Use `children` prop to pass children elements directly into `GooglePlacesAutocomplete`.\n- 1.2.6 : Added `renderRow` prop.\n- 1.2.5 : Added `renderDescription` prop for rendering dropdown item text\n- 1.2.4 : Added `listViewDisplayed` prop for controlling dropdown\n- 1.2.3 : Removed ProgressBarAndroid to remove warnings\n- 1.2.2 : Added prop to change placeholder text color\n- 1.2.1 : Fixed special request characters issue + ensure react-native@0.28 peer dependency.\n\n\n### Example\n\n![](https://raw.githubusercontent.com/FaridSafi/react-native-google-places-autocomplete/master/Assets/screenshot.png)\n\n```js\nvar {GooglePlacesAutocomplete} = require('react-native-google-places-autocomplete');\n\nconst homePlace = {description: 'Home', geometry: { location: { lat: 48.8152937, lng: 2.4597668 } }};\nconst workPlace = {description: 'Work', geometry: { location: { lat: 48.8496818, lng: 2.2940881 } }};\n\nvar Example = React.createClass({\n  render() {\n    return (\n      \u003cGooglePlacesAutocomplete\n        placeholder='Search'\n        minLength={2} // minimum length of text to search\n        autoFocus={false}\n        listViewDisplayed='auto'    // true/false/undefined\n        fetchDetails={true}\n        renderDescription={(row) =\u003e row.description} // custom description render\n        onPress={(data, details = null) =\u003e { // 'details' is provided when fetchDetails = true\n          console.log(data);\n          console.log(details);\n        }}\n        getDefaultValue={() =\u003e {\n          return ''; // text input default value\n        }}\n        query={{\n          // available options: https://developers.google.com/places/web-service/autocomplete\n          key: 'YOUR API KEY',\n          language: 'en', // language of the results\n          types: '(cities)', // default: 'geocode'\n        }}\n        styles={{\n          description: {\n            fontWeight: 'bold',\n          },\n          predefinedPlacesDescription: {\n            color: '#1faadb',\n          },\n        }}\n\n        currentLocation={true} // Will add a 'Current location' button at the top of the predefined places list\n        currentLocationLabel=\"Current location\"\n        nearbyPlacesAPI='GooglePlacesSearch' // Which API to use: GoogleReverseGeocoding or GooglePlacesSearch\n        GoogleReverseGeocodingQuery={{\n          // available options for GoogleReverseGeocoding API : https://developers.google.com/maps/documentation/geocoding/intro\n        }}\n        GooglePlacesSearchQuery={{\n          // available options for GooglePlacesSearch API : https://developers.google.com/places/web-service/search\n          rankby: 'distance',\n          types: 'food',\n        }}\n\n\n        filterReverseGeocodingByTypes={['locality', 'administrative_area_level_3']} // filter the reverse geocoding results by types - ['locality', 'administrative_area_level_3'] if you want to display only cities\n\n        predefinedPlaces={[homePlace, workPlace]}\n\n        debounce={200} // debounce the requests in ms. Set to 0 to remove debounce. By default 0ms.\n        renderLeftButton={() =\u003e \u003cImage source={require('path/custom/left-icon')} /\u003e}\n        renderRightButton={() =\u003e \u003cText\u003eCustom text after the inputg\u003c/Text\u003e}\n      /\u003e\n    );\n  }\n});\n```\n\n\n### Installation\n\n1. ```npm install react-native-google-places-autocomplete --save```\n2. Get your [Google Places API keys](https://developers.google.com/places/) and enable \"Google Places API Web Service\" (NOT Android or iOS) in the console.\n3. Enable \"Google Maps Geocoding API\" if you want to use GoogleReverseGeocoding for Current Location\n\n\n\n### Styling\n\n```GooglePlacesAutocomplete``` can be easily customized to meet styles of your  app. Pass styles props to ```GooglePlacesAutocomplete``` with style object for different elements (keys for style object are listed below)\n\n| key | type |\n| ---- | ---- |\n| container | object (View) |\n| description | object (Text style) |\n| textInputContainer | object (View style) |\n| textInput | object (style) |\n| loader | object (View style) |\n| listView | object (ListView style) |\n| predefinedPlacesDescription | object (Text style) |\n| poweredContainer | object (View style) |\n| powered | object (Image style) |\n\n\n#### Example\n\n\n```\n\u003cGooglePlacesAutocomplete\n  placeholder='Enter Location'\n  minLength={2}\n  autoFocus={false}\n  fetchDetails={true}\n  styles={{\n    textInputContainer: {\n      backgroundColor: 'rgba(0,0,0,0)',\n      borderTopWidth: 0,\n      borderBottomWidth:0\n    },\n    textInput: {\n      marginLeft: 0,\n      marginRight: 0,\n      height: 38,\n      color: '#5d5d5d',\n      fontSize: 16\n    },\n    predefinedPlacesDescription: {\n      color: '#1faadb'\n    },\n  }}\n  currentLocation={false}\n/\u003e\n```\n\n\n### Features\n\n- [x] Places autocompletion\n- [x] iOS and Android compatibility\n- [x] Places details fetching + ActivityIndicatorIOS/ProgressBarAndroid loaders\n- [x] Customizable using the ```styles``` parameter\n- [x] XHR cancellations when typing fast\n- [x] Google Places terms compliant\n- [x] Current location\n- [x] Predefined places\n\n\n### License\n\n[MIT](LICENSE)\n\n### Authors\n\n- [Farid Safi](https://www.twitter.com/FaridSafi)\n- [Maxim Yaskevich](https://www.twitter.com/mayaskme)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopengeekslab%2Freact-native-google-places-autocomplete","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopengeekslab%2Freact-native-google-places-autocomplete","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopengeekslab%2Freact-native-google-places-autocomplete/lists"}