@react-native-community/picker vs @react-native-picker/picker vs react-native-dropdown-picker vs react-native-picker-select vs react-native-select-dropdown
React Native Picker Libraries
@react-native-community/picker@react-native-picker/pickerreact-native-dropdown-pickerreact-native-picker-selectreact-native-select-dropdownSimilar Packages:

React Native Picker Libraries

Picker libraries in React Native provide developers with customizable dropdown menus for selecting options in mobile applications. These libraries enhance user experience by allowing users to choose from a list of options in a visually appealing and interactive manner. Each library offers unique features and design principles, catering to different use cases and preferences in mobile app development.

Npm Package Weekly Downloads Trend

3 Years

Github Stars Ranking

Stat Detail

Package
Downloads
Stars
Size
Issues
Publish
License
@react-native-community/picker01,753-2615 years agoMIT
@react-native-picker/picker01,753399 kB2615 months agoMIT
react-native-dropdown-picker01,046161 kB1643 years agoMIT
react-native-picker-select01,85345.8 kB1022 years agoMIT
react-native-select-dropdown036535.5 kB542 years agoMIT

Feature Comparison: @react-native-community/picker vs @react-native-picker/picker vs react-native-dropdown-picker vs react-native-picker-select vs react-native-select-dropdown

Customization

  • @react-native-community/picker:

    This package offers limited customization options, primarily focusing on basic styling. It allows developers to set styles for the picker but lacks advanced features for customization.

  • @react-native-picker/picker:

    Provides a good level of customization, allowing developers to style the picker component extensively. You can customize the appearance of the dropdown and selected item, making it suitable for various design requirements.

  • react-native-dropdown-picker:

    Highly customizable with options for styling, animations, and multi-select capabilities. Developers can easily change the look and feel of the dropdown to match their app's theme and user experience needs.

  • react-native-picker-select:

    Offers moderate customization options, allowing for custom styles and placeholder text. It is designed to be flexible while maintaining simplicity in implementation.

  • react-native-select-dropdown:

    Supports extensive customization, including styles for dropdown items, selected items, and placeholder text. It also allows for custom rendering of items, making it versatile for different use cases.

Multi-Select Support

  • @react-native-community/picker:

    This package does not support multi-select functionality, making it suitable only for single selections.

  • @react-native-picker/picker:

    Does not provide built-in multi-select support, focusing instead on single item selection.

  • react-native-dropdown-picker:

    Supports multi-select out of the box, allowing users to select multiple options simultaneously, which is beneficial for applications requiring complex selections.

  • react-native-picker-select:

    This package does not natively support multi-select but can be adapted for such use cases with additional logic.

  • react-native-select-dropdown:

    Offers multi-select functionality, making it a great choice for applications that require users to select multiple items from a list.

Ease of Use

  • @react-native-community/picker:

    Simple to implement with minimal setup required, making it a good choice for beginners or simple applications.

  • @react-native-picker/picker:

    Easy to use with a clear API, suitable for developers who need a straightforward picker without complex configurations.

  • react-native-dropdown-picker:

    User-friendly with a rich set of features that are easy to implement, making it suitable for developers looking for advanced functionality without a steep learning curve.

  • react-native-picker-select:

    Straightforward to use with clear documentation, making it accessible for developers of all skill levels.

  • react-native-select-dropdown:

    Designed for ease of use, with a simple API and good documentation, making it easy to integrate into projects.

Performance

  • @react-native-community/picker:

    Performance is generally good for basic use cases, but may lag with complex customizations or large datasets.

  • @react-native-picker/picker:

    Optimized for performance across both iOS and Android, ensuring smooth interactions even with larger datasets.

  • react-native-dropdown-picker:

    Performance can vary depending on the number of items and customizations, but generally performs well for most use cases.

  • react-native-picker-select:

    Lightweight and performs efficiently, making it suitable for applications that prioritize speed and responsiveness.

  • react-native-select-dropdown:

    Performance is solid, but heavy customizations or large datasets may impact responsiveness; however, it is generally efficient for typical use cases.

Community Support

  • @react-native-community/picker:

    Being part of the React Native community, it has decent support and documentation, but may not be as actively maintained as others.

  • @react-native-picker/picker:

    Well-maintained with active community support, ensuring regular updates and improvements based on user feedback.

  • react-native-dropdown-picker:

    Has a supportive community and good documentation, making it easier for developers to find help and resources.

  • react-native-picker-select:

    Strong community support with good documentation, making it easy for developers to troubleshoot and find examples.

  • react-native-select-dropdown:

    Active community support with regular updates, ensuring that developers have access to the latest features and fixes.

How to Choose: @react-native-community/picker vs @react-native-picker/picker vs react-native-dropdown-picker vs react-native-picker-select vs react-native-select-dropdown

  • @react-native-community/picker:

    Choose this package if you are looking for a simple and straightforward picker component that integrates well with the React Native ecosystem and is maintained by the community. It is suitable for basic use cases where customization is not a priority.

  • @react-native-picker/picker:

    Opt for this package if you need a more modern and flexible picker that supports both iOS and Android with a consistent API. It is ideal for projects that require a customizable and responsive dropdown experience.

  • react-native-dropdown-picker:

    Select this library if you want a highly customizable dropdown component with built-in support for multi-select and search functionality. It is perfect for applications that require advanced features and a rich user interface.

  • react-native-picker-select:

    Use this package if you prefer a lightweight solution that allows for custom styling and integrates easily with React Native forms. It is great for projects that need a simple yet effective picker without heavy dependencies.

  • react-native-select-dropdown:

    Choose this package if you need a dropdown component that supports both single and multiple selections with easy customization options. It is suitable for applications that require a versatile dropdown experience.

README for @react-native-community/picker

@react-native-community/picker

npm version CircleCI Status Supports Android and iOS MIT License Lean Core Extracted

AndroidiOSPickerIOSWindowsMacOS

Supported Versions

@react-native-community/pickerreact-native
>= 1.2.00.60+ or 0.59+ with Jetifier
>= 1.0.00.57

For Managed Workflow users using Expo 37

This component is not supported in the managed workflow for expo sdk 37. Please import the Picker from react-native. See more info here

Getting started

$ npm install @react-native-community/picker --save

or

$ yarn add @react-native-community/picker

For react-native@0.60.0 or above

As react-native@0.60.0 or above supports autolinking, so there is no need to run linking process. Read more about autolinking here.

iOS

CocoaPods on iOS needs this extra step

npx pod-install

Android

No additional step is required.

Windows

Add the ReactNativePicker project to your solution.
  1. Open the solution in Visual Studio 2019
  2. Right-click Solution icon in Solution Explorer > Add > Existing Project Select D:\dev\RNTest\node_modules\@react-native-community\picker\windows\ReactNativePicker\ReactNativePicker.vcxproj
windows/myapp.sln

Add a reference to ReactNativePicker to your main application project. From Visual Studio 2019:

Right-click main application project > Add > Reference... Check ReactNativePicker from Solution Projects.

pch.h

Add #include "winrt/ReactNativePicker.h".

app.cpp

Add PackageProviders().Append(winrt::ReactNativePicker::ReactPackageProvider()); before InitializeComponent();.

MacOS

CocoaPods on MacOS needs this extra step (called from the MacOS directory)

pod install

Mostly automatic installation (react-native < 0.60)

$ react-native link @react-native-community/picker

Manual installation (react-native < 0.60)

iOS

  1. In XCode, in the project navigator, right click Libraries ➜ Add Files to [your project's name]
  2. Go to node_modules ➜ @react-native-community/picker and add RNCPicker.xcodeproj
  3. In XCode, in the project navigator, select your project. Add libRNCPicker.a to your project's Build Phases ➜ Link Binary With Libraries
  4. Run your project (Cmd+R)<

Android

  1. Open application file (android/app/src/main/java/[...]/MainApplication.java)
  • Add import com.reactnativecommunity.picker.RNCPickerPackage; to the imports at the top of the file
  • Add new RNCPickerPackage() to the list returned by the getPackages() method
  1. Append the following lines to android/settings.gradle:
    include ': @react-native-community/picker'
    project(': @react-native-community/picker').projectDir = new File(rootProject.projectDir, 	'../node_modules/@react-native-community/picker/android')
    
  2. Insert the following lines inside the dependencies block in android/app/build.gradle:
      implementation project(path: ':@react-native-community_picker')
    

MacOS

  1. In XCode, in the project navigator, right click Libraries ➜ Add Files to [your project's name]
  2. Go to node_modules ➜ @react-native-community/picker and add RNCPicker.xcodeproj
  3. In XCode, in the project navigator, select your project. Add libRNCPicker.a to your project's Build Phases ➜ Link Binary With Libraries
  4. Run your project (Cmd+R)<

Usage

Picker

Renders the native picker component on iOS and Android. Example:

Usage

Import Picker from @react-native-community/picker

import {Picker} from '@react-native-community/picker';

Create state which will be used by the Picker

state = {
  language: 'java',
};

Add Picker like this:

<Picker
  selectedValue={this.state.language}
  style={{height: 50, width: 100}}
  onValueChange={(itemValue, itemIndex) =>
    this.setState({language: itemValue})
  }>
  <Picker.Item label="Java" value="java" />
  <Picker.Item label="JavaScript" value="js" />
</Picker>

Props


Reference

Props

onValueChange

Callback for when an item is selected. This is called with the following parameters:

  • itemValue: the value prop of the item that was selected
  • itemPosition: the index of the selected item in this picker
TypeRequired
functionNo

selectedValue

Value matching value of one of the items. Can be a string or an integer.

TypeRequired
anyNo

style

TypeRequired
pickerStyleTypeNo

testID

Used to locate this view in end-to-end tests.

TypeRequired
stringNo

enabled

If set to false, the picker will be disabled, i.e. the user will not be able to make a selection.

TypeRequiredPlatform
boolNoAndroid, Windows

mode

On Android, specifies how to display the selection items when the user taps on the picker:

  • 'dialog': Show a modal dialog. This is the default.
  • 'dropdown': Shows a dropdown anchored to the picker view
TypeRequiredPlatform
enum('dialog', 'dropdown')NoAndroid

prompt

Prompt string for this picker, used on Android in dialog mode as the title of the dialog.

TypeRequiredPlatform
stringNoAndroid

itemStyle

Style to apply to each of the item labels.

TypeRequiredPlatform
text stylesNoiOS, Windows

PickerIOS

Props


Reference

Props

itemStyle

TypeRequired
text stylesNo

onValueChange

TypeRequired
functionNo

selectedValue

TypeRequired
anyNo