Socket
Book a DemoInstallSign in
Socket

react-native-place-picker

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-place-picker

Pick place with single click

latest
Source
npmnpm
Version
3.1.0
Version published
Weekly downloads
49
-9.26%
Maintainers
1
Weekly downloads
 
Created
Source

NPM Version Tests Passing GitHub Contributors Issues GitHub pull requests

Features

  • 🎨 Theme customization.
  • 📱 UI written natively.
  • 🗺️ Location reverse-geocoding (coordinate -> address).
  • 🔍 Searchable (users can search for location).
  • 📍 Device location.
  • ⚙️ Fully configurable.
  • 🏗️ Supporting Turbo Modules (New Arch) with backward compatibility.
  • ⚡ Renders on top of the app (Blazing Fast).
  • 📐 Well typed.
  • 📦 Significantly small package.
  • 🔗 No peer dependencies except React and React-Native [1].

How is it working?

This plugin is built only by create native page UIViewController for iOS or Activity for Android. and present the page in front of React Native Application without any special dependencies just native code

Installation

npm install react-native-place-picker
# or
yarn add react-native-place-picker
# or
pnpm add react-native-place-picker
# or
bun add react-native-place-picker

Expo

  • You need to add expo-dev-client and run expo run:ios or expo run:android

Info Expo managed app not supported 🚧

iOS

  • If you want to enable user current location button you have to add this to your Info.plist
<key>NSLocationWhenInUseUsageDescription</key>
<string>YOUR_PURPOSE_HERE</string>

Android ⚠️

  • Add to your AndroidManifest.xml you Google Map API Key or your application will crash
<meta-data
   android:name="com.google.android.geo.API_KEY"
   android:value="YOUR_KEY" />

Request

import { pickPlace } from "react-native-place-picker";

pickPlace({
  enableUserLocation: true,
  enableGeocoding: true,
  color: "#FF00FF",
  // Range selection (optional)
  enableRangeSelection: true,
  initialRadius: 2000,
  minRadius: 250,
  maxRadius: 10000,
  radiusColor: '#FF00FF33',
  radiusStrokeColor: '#FF00FF',
  radiusStrokeWidth: 2,
  //...etc
})
  .then(console.log)
  .catch(console.log);

// or

pickPlace().then(console.log).catch(console.log);

Result


{
    /**
     * @description Selected coordinate.
     */
    coordinate: PlacePickerCoordinate;
    /**
     * @description Geocoded address for selected location.
     * @if `enableGeocoding: true`
     */
    address?: PlacePickerAddress;
    /**
     * @description Did cancel the place picker window without selecting.
     */
    didCancel: boolean;
}

PlacePickerOptions

PropertyTypeDescriptionDefault
presentationStylePlacePickerPresentationStyle | stringPresentation style of the place picker window. iOS only'fullscreen'
titlestringThe title of the place picker window.'Choose Place'
searchPlaceholderstringPlaceholder for the search bar in the place picker window.'Search...'
colorstringPrimary color of the theme (map pin, shadow, etc.).'#FF0000'
contrastColorstringContrast color for the primary color.'#FFFFFF'
localestringLocale for the returned address.'en-US'
initialCoordinatesPlacePickerCoordinateInitial map position.{ latitude: 25.2048, longitude: 55.2708 }
enableGeocodingbooleangeocoding for the selected address.true
enableSearchbooleansearch bar for searching specific positions.true
enableUserLocationbooleancurrent user position button. Requires setup.true
enableLargeTitlebooleanlarge navigation bar title of the UIViewController. iOS onlytrue
rejectOnCancelbooleanReject and return nothing if the user dismisses the window without selecting a place.true
enableRangeSelectionbooleanEnable draggable radius selection overlay.false
initialRadiusnumberInitial radius in meters when range selection is enabled.1000
minRadiusnumberMinimum allowed radius in meters.100
maxRadiusnumberMaximum allowed radius in meters.10000
radiusColorstringFill color of radius circle (falls back to color with alpha).''
radiusStrokeColorstringStroke color of radius circle (falls back to color).''
radiusStrokeWidthnumberStroke width of radius circle in pixels.2

PlacePickerPresentationStyle

Enum ValueDescription
modalPresentation style as a modal window.
fullscreenPresentation style in fullscreen mode.

PlacePickerAddress

PropertyTypeDescription
namestringName of the location.
streetNamestringStreet name of the address.
citystringCity of the address.
statestringState of the address.
zipCodestringZip code of the address.
countrystringCountry of the address.

PlacePickerCoordinate

PropertyTypeDescription
latitudenumberLatitude of the location.
longitudenumberLongitude of the location.

PlacePickerResults

PropertyTypeDescription
coordinatePlacePickerCoordinateSelected coordinate.
addressPlacePickerAddressGeocoded address for selected location (if enableGeocoding).
didCancelbooleanIndicates if the place picker was canceled without selecting.
radiusnumberSelected radius in meters (if range selection enabled).
radiusCoordinates{ center, bounds }Center and bounds of the selected area.

Contributing

See the contributing guide to learn how to contribute to the repository and the development workflow.

License

MIT

Keywords

react-native

FAQs

Package last updated on 30 Oct 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts