Skip to main content

Migrate from react-native-picker-select

- <RNPickerSelect
- items={[{ label: 'Football', value: 'football' }]}
- onValueChange={setSport}
- value={sport}
- placeholder={{ label: 'Select a sport…', value: null }}
- />
+ <Select
+ options={[{ label: 'Football', value: 'football' }]}
+ onValueChange={setSport}
+ value={sport}
+ placeholder="Select a sport…"
+ />
react-native-picker-selectPatine UI
itemsoptions (adds description, icon, group, keywords)
onValueChange(value, index)onValueChange(value, option)
valuevalue
placeholder={{ label }}placeholder="…"
disableddisabled
onOpen / onCloseonOpenChange(open)
doneTextsheet={{ confirmLabel }} (Done shown with closeOnSelect={false} / multiple)
style={{ inputIOS, inputAndroid }}styles={{ trigger, triggerText, placeholder }}
—multiple, searchable, clearable, maxSelected, renderTrigger, renderOption

Want an iOS-style wheel instead of a list? Use WheelPickerSheet.

See all migration guides for other libraries, and Comparison for when another library is the better choice.