Skip to main content
Version: 0.62

🚧 Picker

Deprecated. Use @react-native-community/picker instead.

Renders the native picker component on Android and iOS.

Example​


Reference

Props​

Inherits View Props.

enabled​

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

TypeRequiredPlatform
boolNoAndroid

itemStyle​

Style to apply to each of the item labels.

TypeRequiredPlatform
text stylesNoiOS

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

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

prompt​

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

TypeRequiredPlatform
stringNoAndroid

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