Picker

Renders the native <select> component

import { Picker } from 'react-native';

<Picker {...props}>
<Picker.Item />
</Picker>;

API

Props

...ViewProps ?ViewProps

All the props supported by View.

children ?(...Picker.Item)

The items to display in the picker must be of type Picker.Item.

enabled ?boolean = true

Determines if the picker will be disabled, i.e., the user will not be able to make a selection.

onValueChange ?(value, index) => void

Callback for when an item is selected. This is called with the value and index prop of the item that was selected.

selectedValue ?string

Select the item with the matching value.

style ?{ ...ViewProps.style, color: ?string }

Supported style properties.

Picker.Item

color ?string

Color of the item label. (Limited by browser support.)

label ?string

Text to display for this item.

testID ?string

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

value ?(number | string)

The value to be passed to the picker’s onValueChange callback when this item is selected.

Updated
Edit
React Native for WebCopyright © Nicolas Gallagher and Meta Platforms, Inc.