{"_id":"@adalo/react-native-picker","_rev":"2-b1764a05bc78fa7c24a12258f4fff1ae","name":"@adalo/react-native-picker","dist-tags":{"latest":"1.16.1"},"versions":{"1.16.1":{"name":"@adalo/react-native-picker","version":"1.16.1","keywords":["react-native","react native","picker","dropdown","select"],"author":{},"license":"MIT","_id":"@adalo/react-native-picker@1.16.1","maintainers":[{"name":"guislain-adalo","email":"guislain@adalo.com"},{"name":"adalodev","email":"adalodev@adalo.com"},{"name":"adalo-jasongilmore","email":"jason.gilmore@adalo.com"},{"name":"danielcostadev","email":"daniel.costa@adalo.com"},{"name":"oleksandrvakulinskyi","email":"oleksandr.vakulinskyi@adalo.com"},{"name":"adebroux","email":"alicia.debroux@adalo.com"},{"name":"michael-adalo","email":"michael.aldridge@adalo.com"},{"name":"enzo-adalo","email":"enzo.monjardin@adalo.com"},{"name":"pneubaueradalo","email":"pawel.neubauer@adalo.com"}],"homepage":"https://github.com/react-native-picker/picker#readme","dist":{"shasum":"b190756778ba0a43b0c8ffeababadc2c96e0f77f","tarball":"https://registry.npmjs.org/@adalo/react-native-picker/-/react-native-picker-1.16.1.tgz","fileCount":110,"integrity":"sha512-bEJReZeN0YMT9N6u2UyAQzCnBbfbTmWq9p0bp1Q10CkxSg7/2uhQ+ot8exWgzuXjulYuJ+wwsYeQ5chNDRcy8w==","signatures":[{"sig":"MEUCIQCJRPt6qCkiaS5taDxIslYCwnIHvMj10SK9r6ZpRX5ocQIgauvyasfn2pWZpxVYXQesGL/OJRZDb3JF71c6bxjzOQ4=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":165783},"jest":{"preset":"react-native","setupFilesAfterEnv":["<rootDir>/jest.setup.js"]},"main":"./js/index.js","detox":{"test-runner":"jest","runner-config":"example/e2e/config.json","configurations":{"ios.sim.debug":{"name":"iPhone X","type":"ios.simulator","build":"export RCT_NO_LAUNCH_PACKAGER=true && xcodebuild -project example/ios/PickerExample.xcodeproj -destination 'platform=iOS Simulator,name=iPhone X' -scheme PickerExample -parallelizeTargets -configuration Debug -derivedDataPath example/ios/build  -UseModernBuildSystem=YES | xcpretty -k","binaryPath":"example/ios/build/Build/Products/Debug-iphonesimulator/PickerExample.app"},"ios.sim.release":{"name":"iPhone X","type":"ios.simulator","build":"export RCT_NO_LAUNCH_PACKAGER=true && xcodebuild -project example/ios/PickerExample.xcodeproj -destination 'platform=iOS Simulator,name=iPhone X' -scheme PickerExample -parallelizeTargets -configuration Release -derivedDataPath example/ios/build  -UseModernBuildSystem=YES | xcpretty -k","binaryPath":"example/ios/build/Build/Products/Release-iphonesimulator/PickerExample.app"},"android.emu.debug":{"name":"TestingAVD","type":"android.emulator","build":"export RCT_NO_LAUNCH_PACKAGER=true && pushd example/android && ./gradlew assembleDebug assembleAndroidTest -DtestBuildType=debug && popd","binaryPath":"example/android/app/build/outputs/apk/debug/app-debug.apk"},"android.emu.release":{"name":"TestingAVD","type":"android.emulator","build":"export RCT_NO_LAUNCH_PACKAGER=true && pushd example/android && ./gradlew assembleRelease assembleAndroidTest -DtestBuildType=release && popd","binaryPath":"example/android/app/build/outputs/apk/release/app-release.apk"}}},"husky":{"hooks":{"pre-commit":"pretty-quick --staged --pattern '**/*.*(js|jsx)'"}},"types":"./typings/index.d.ts","private":false,"scripts":{"ios":"cd example && react-native run-ios","web":"expo web","test":"yarn validate:eslint && yarn validate:flow && yarn validate:typescript && yarn test:jest","macos":"cd example && react-native run-macos","start":"react-native start","android":"react-native run-android --root example","test:jest":"jest js/","ci:publish":"yarn semantic-release","start:windows":"react-native start --projectRoot ./ --use-react-native-windows","validate:flow":"flow check","validate:eslint":"eslint 'js/**/*.js' 'example/**/*.js'","semantic-release":"semantic-release","test:detox:clean":"rimraf example/android/build && rimraf example/android/app/build && rimraf example/android/.gradle && rimraf example/ios/build","validate:typescript":"tsc --project ./","test:detox:ios:test:debug":"detox test -c ios.sim.debug","test:detox:ios:build:debug":"detox build -c ios.sim.debug","test:detox:ios:test:release":"detox test -c ios.sim.release","test:detox:ios:build:release":"detox build -c ios.sim.release","test:detox:android:test:debug":"detox test -c android.emu.debug","test:detox:ios:bundle:release":"mkdir -p .tmp && react-native bundle --max-workers 4 --platform ios --dev false --entry-file example/index.js --bundle-output .tmp/ios-bundle.js","test:detox:android:build:debug":"detox build -c android.emu.debug","test:detox:android:test:release":"detox test -c android.emu.release","test:detox:android:build:release":"detox build -c android.emu.release","test:detox:android:bundle:release":"mkdir -p .tmp && react-native bundle --max-workers 4 --platform android --dev false --entry-file example/index.js --bundle-output .tmp/android-bundle.js"},"_npmUser":{"name":"adalodev","email":"adalodev@adalo.com"},"repository":{"url":"https://github.com/react-native-picker/picker.git","type":"git"},"description":"React Native Picker for iOS & Android","directories":{},"licenseText":"MIT License\n\nCopyright (c) 2015-present, Facebook, Inc.\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"expo":"^40.0.0","jest":"^26.6.3","detox":"^17.10.6","husky":"^2.2.0","react":"16.9.0","eslint":"^7.22.0","rimraf":"^2.6.3","flow-bin":"0.141.0","prettier":"^2.2.1","react-dom":"16.9.0","babel-jest":"^26.6.3","typescript":"^4.2.3","@babel/core":"^7.6.2","@types/react":"16.9.0","pretty-quick":"^2.0.1","react-native":"0.61.5","@babel/runtime":"^7.6.2","react-native-web":"^0.14.10","semantic-release":"^17.3.0","react-native-macos":"0.61.63","@types/react-native":"0.61.23","react-test-renderer":"16.9.0","@expo/webpack-config":"^0.12.40","react-native-windows":"0.61.0","@semantic-release/git":"^9.0.0","eslint-plugin-prettier":"^3.0.1","babel-plugin-module-resolver":"^3.2.0","metro-react-native-babel-preset":"^0.59.0","@react-native-community/eslint-config":"^2.0.0"},"peerDependencies":{"react":"16 || 17","react-native":">=0.57"},"_npmOperationalInternal":{"tmp":"tmp/react-native-picker_1.16.1_1758287413408_0.916436968465804","host":"s3://npm-registry-packages-npm-production"}}},"time":{"created":"2025-09-19T13:10:13.355Z","modified":"2025-11-21T07:47:20.024Z","1.16.1":"2025-09-19T13:10:13.614Z"},"author":{},"license":"MIT","homepage":"https://github.com/react-native-picker/picker#readme","keywords":["react-native","react native","picker","dropdown","select"],"repository":{"url":"https://github.com/react-native-picker/picker.git","type":"git"},"description":"React Native Picker for iOS & Android","maintainers":[{"email":"guislain@adalo.com","name":"guislain-adalo"},{"email":"adalodev@adalo.com","name":"adalodev"},{"email":"jason.gilmore@adalo.com","name":"adalo-jasongilmore"},{"email":"daniel.costa@adalo.com","name":"danielcostadev"},{"email":"oleksandr.vakulinskyi@adalo.com","name":"oleksandrvakulinskyi"},{"email":"alicia.debroux@adalo.com","name":"adebroux"},{"email":"michael.aldridge@adalo.com","name":"michael-adalo"},{"email":"enzo.monjardin@adalo.com","name":"enzo-adalo"},{"email":"oleksandr.kalashnyk@adalo.com","name":"oleksandrkalashnyk"},{"email":"pawel.neubauer@adalo.com","name":"pneubaueradalo"}],"readme":"\n#  `@react-native-picker/picker`\n\n\n\n[![npm version](https://img.shields.io/npm/v/@react-native-picker/picker.svg)](https://www.npmjs.com/package/@react-native-picker/picker)\n[![Build](https://github.com/react-native-picker/picker/workflows/Build/badge.svg)](https://github.com/react-native-picker/picker/actions) ![Supports Android, iOS, MacOS, and Windows](https://img.shields.io/badge/platforms-android%20|%20ios|%20macos|%20windows-lightgrey.svg) ![MIT License](https://img.shields.io/npm/l/@react-native-picker/picker.svg) [![Lean Core Extracted](https://img.shields.io/badge/Lean%20Core-Extracted-brightgreen.svg)](https://github.com/facebook/react-native/issues/23313)\n\n| Android | iOS | PickerIOS | Windows | MacOS |\n| --- | --- | --- | --- | --- |\n| <img src=\"./screenshots/picker-android.png\" width=\"150\"> | <img src=\"./screenshots/picker-ios.png\" width=\"150\"> | <img src=\"./screenshots/pickerios-ios.png\" width=\"150\"> | <img src=\"./screenshots/picker-windows.png\" width=\"300\"> | <img src=\"./screenshots/picker-macos.png\" width=\"300\">\n\n## Supported Versions\n\n| @react-native-picker/picker | react-native |\n| --- | --- |\n| >= 1.2.0 | 0.60+ or 0.59+ with [Jetifier](https://www.npmjs.com/package/jetifier) |\n| >= 1.0.0 | 0.57 |\n\n## For Managed Workflow users using Expo 37\nThis component is not supported in the managed workflow for expo sdk 37. Please import the `Picker` from `react-native`.\nSee more info [here](https://github.com/react-native-picker/picker/issues/45#issuecomment-633163973)\n   \n## Getting started\n\n`$ npm install @react-native-picker/picker --save`\n\nor\n\n`$ yarn add @react-native-picker/picker`\n\n### For React Native v0.60 and above (Autolinking)\n\nAs [react-native@0.60](https://reactnative.dev/blog/2019/07/03/version-60) and above supports autolinking there is no need to run the linking process. \nRead more about autolinking [here](https://github.com/react-native-picker/cli/blob/master/docs/autolinking.md).\n\n#### iOS\nCocoaPods on iOS needs this extra step:\n\n```\nnpx pod-install\n```\n\n#### Android\nNo additional step is required.\n\n<details>\n<summary>Windows (expand for details)</summary>\n\n#### Windows\nUsage in Windows requires the following extra steps:\n\n##### Add the `ReactNativePicker` project to your solution.\n\n1. Open the solution in Visual Studio 2019\n2. Right-click Solution icon in Solution Explorer > Add > Existing Project\n   Select `D:\\dev\\RNTest\\node_modules\\@react-native-picker\\picker\\windows\\ReactNativePicker\\ReactNativePicker.vcxproj`\n\n##### **windows/myapp.sln**\nAdd a reference to `ReactNativePicker` to your main application project. From Visual Studio 2019:\n\nRight-click main application project > Add > Reference...\n  Check `ReactNativePicker` from Solution Projects.\n\n##### **pch.h**\n\nAdd `#include \"winrt/ReactNativePicker.h\"`.\n\n##### **app.cpp**\n\nAdd `PackageProviders().Append(winrt::ReactNativePicker::ReactPackageProvider());` before `InitializeComponent();`.\n</details>\n\n#### MacOS\nCocoaPods on MacOS needs this extra step (called from the MacOS directory)\n\n```\npod install\n```\n\n\n<details>\n   <summary>React Native below 0.60 (Link and Manual Installation)</summary>\n\nThe following steps are only necessary if you are working with a version of React Native lower than 0.60\n### Mostly automatic installation\n\n`$ react-native link @react-native-picker/picker`\n\n### Manual installation\n\n\n#### iOS\n\n1. In XCode, in the project navigator, right click `Libraries` ➜ `Add Files to [your project's name]`\n2. Go to `node_modules` ➜ ` @react-native-picker/picker` and add `RNCPicker.xcodeproj`\n3. In XCode, in the project navigator, select your project. Add `libRNCPicker.a` to your project's `Build Phases` ➜ `Link Binary With Libraries`\n4. Run your project (`Cmd+R`)<\n\n#### Android\n\n1. Open **application** file (`android/app/src/main/java/[...]/MainApplication.java`)\n  - Add `import com.reactnativecommunity.picker.RNCPickerPackage;` to the imports at the top of the file\n  - Add `new RNCPickerPackage()` to the list returned by the `getPackages()` method\n2. Append the following lines to `android/settings.gradle`:\n  \t```\n  \tinclude ':@react-native-picker_picker'\n  \tproject(':@react-native-picker_picker').projectDir = new File(rootProject.projectDir, \t'../node_modules/@react-native-picker/picker/android')\n  \t```\n3. Insert the following lines inside the dependencies block in `android/app/build.gradle`:\n  \t```\n      implementation project(path: ':@react-native-picker_picker')\n  \t```\n#### MacOS\n\n1. In XCode, in the project navigator, right click `Libraries` ➜ `Add Files to [your project's name]`\n2. Go to `node_modules` ➜ ` @react-native-picker/picker` and add `RNCPicker.xcodeproj`\n3. In XCode, in the project navigator, select your project. Add `libRNCPicker.a` to your project's `Build Phases` ➜ `Link Binary With Libraries`\n4. Run your project (`Cmd+R`)<\n</details>\n\n## Usage\n\nImport Picker from `@react-native-picker/picker`:\n\n```javascript\nimport {Picker} from '@react-native-picker/picker';\n```\n\nCreate state which will be used by the `Picker`:\n\n```javascript\nconst [selectedLanguage, setSelectedLanguage] = useState();\n```\n\nAdd `Picker` like this:\n\n```javascript\n<Picker\n  selectedValue={selectedLanguage}\n  onValueChange={(itemValue, itemIndex) =>\n    setSelectedLanguage(itemValue)\n  }>\n  <Picker.Item label=\"Java\" value=\"java\" />\n  <Picker.Item label=\"JavaScript\" value=\"js\" />\n</Picker>\n```\n\nIf you want to open/close picker programmatically on android, pass ref to `Picker`:\n\n```javascript\nconst pickerRef = useRef();\n\nfunction open() {\n  pickerRef.current.focus();\n}\n\nfunction close() {\n  pickerRef.current.blur();\n}\n\nreturn <Picker\n  ref={pickerRef}\n  selectedValue={selectedLanguage}\n  onValueChange={(itemValue, itemIndex) =>\n    setSelectedLanguage(itemValue)\n  }>\n  <Picker.Item label=\"Java\" value=\"java\" />\n  <Picker.Item label=\"JavaScript\" value=\"js\" />\n</Picker>\n```\n\n### Props\n\n* [Inherited `View` props...](https://reactnative.dev/docs/view#props)\n\n- [`onValueChange`](#onvaluechange)\n- [`selectedValue`](#selectedvalue)\n- [`style`](#style)\n- [`testID`](#testid)\n- [`enabled`](#enabled)\n- [`mode`](#mode)\n- [`prompt`](#prompt)\n- [`itemStyle`](#itemstyle)\n\n---\n\n# Reference\n\n## Props\n\n### `onValueChange`\n\nCallback for when an item is selected. This is called with the following parameters:\n\n* `itemValue`: the `value` prop of the item that was selected\n* `itemPosition`: the index of the selected item in this picker\n\n| Type     | Required |\n| -------- | -------- |\n| function | No       |\n\n---\n\n### `selectedValue`\n\nValue matching value of one of the items. Can be a string or an integer.\n\n| Type | Required |\n| ---- | -------- |\n| any  | No       |\n\n---\n\n### `style`\n\n| Type            | Required |\n| --------------- | -------- |\n| pickerStyleType | No       |\n\n---\n\n### `testID`\n\nUsed to locate this view in end-to-end tests.\n\n| Type   | Required |\n| ------ | -------- |\n| string | No       |\n\n---\n\n### `enabled`\n\nIf set to false, the picker will be disabled, i.e. the user will not be able to make a selection.\n\n| Type | Required | Platform |\n| ---- | -------- | -------- |\n| bool | No       | Android, Windows  |\n\n---\n\n### `mode`\n\nOn Android, specifies how to display the selection items when the user taps on the picker:\n\n* 'dialog': Show a modal dialog. This is the default.\n* 'dropdown': Shows a dropdown anchored to the picker view\n\n| Type                       | Required | Platform |\n| -------------------------- | -------- | -------- |\n| enum('dialog', 'dropdown') | No       | Android  |\n\n---\n\n### `dropdownIconColor`\n\nOn Android, specifies color of dropdown triangle. Input value should be hexadecimal string.\n\n| Type   | Required | Platform |\n| ------ | -------- | -------- |\n| string | No       | Android  |\n\n---\n\n### `prompt`\n\nPrompt string for this picker, used on Android in dialog mode as the title of the dialog.\n\n| Type   | Required | Platform |\n| ------ | -------- | -------- |\n| string | No       | Android  |\n\n---\n\n### `itemStyle`\n\nStyle to apply to each of the item labels.\n\n| Type                               | Required | Platform |\n| ---------------------------------- | -------- | -------- |\n| [text styles](https://reactnative.dev/docs/text-style-props) | No       | iOS, Windows      |\n\n### `numberOfLines`\n\nOn Android, used to truncate the text with an ellipsis after computing the text layout, including line wrapping,\nsuch that the total number of lines does not exceed this number. Default is '1'\n\n| Type    | Required | Platform |\n| ------- | -------- | -------- |\n| number  | No       | Android  |\n\n### `onBlur`\n\n| Type      | Required | Platform |\n| --------- | -------- | -------- |\n| function  | no       | Android  |\n\n### `onFocus`\n\n| Type      | Required | Platform |\n| --------- | -------- | -------- |\n| function  | no       | Android  |\n\n## Methods\n\n### `blur` (Android only)\n\nProgrammatically closes picker\n\n### `focus` (Android only)\n\nProgrammatically opens picker\n\n## PickerItemProps\n\nProps that can be applied to individual `Picker.Item`\n\n### `label`\n\nDisplayed value on the Picker Item\n\n| Type    | Required | \n| ------- | -------- | \n| string  | yes       | \n\n\n### `value`\n\nActual value on the Picker Item\n\n| Type    | Required |\n| ------- | -------- |\n| number,string | yes     |\n\n### `color`\n\nDisplayed color on the Picker Item\n\n| Type    | Required | \n| ------- | -------- | \n| string  | no       | \n\n\n### `fontFamily`\n\nDisplayed fontFamily on the Picker Item\n\n| Type    | Required |\n| ------- | -------- |\n| string  | no      | \n\n\n### `style`\n\nStyle to apply to individual item labels.\n\n| Type    | Required | Platform |\n| ------- | -------- | -------- |\n| ViewStyleProp  | no       | Android  |\n\n\n### `enabled`\n\nIf set to false, the specific item will be disabled, i.e. the user will not be able to make a selection\n\n@default: true\n\n| Type    | Required | Platform |\n| ------- | -------- | -------- |\n| boolean  | no       | Android  |\n\n\n### PickerIOS\n### Props\n\n- [Inherited `View` props...](https://reactnative.dev/docs/view#props)\n- [`itemStyle`](#itemstyle)\n- [`onValueChange`](#onvaluechange)\n- [`selectedValue`](#selectedvalue)\n\n---\n\n# Reference\n\n## Props\n\n### `itemStyle`\n\n| Type                               | Required |\n| ---------------------------------- | -------- |\n| [text styles](https://reactnative.dev/docs/text-style-props) | No       |\n\n---\n\n### `onValueChange`\n\n| Type     | Required |\n| -------- | -------- |\n| function | No       |\n\n---\n\n### `selectedValue`\n\n| Type | Required |\n| ---- | -------- |\n| any  | No       |\n\n  \n","readmeFilename":"README.md"}