A React Native SelectInput for iOS (+Android) which shows the picker as a keyboard.
v1.1.3requiresRN>=0.49- Use
v1.1.2for older RN versions.
Installation can be done through npm or yarn:
npm i react-native-select-input-ios --saveyarn add react-native-select-input-iosImport react-native-keyboard-select-input-ios and wrap your content inside
it:
import SelectInput from 'react-native-select-input-ios';or:
var SelectInput = require('react-native-select-input-ios');Check example directory or clone repository and run the example!
git clone https://github.com/markuswind/react-native-select-input-ios
cd example
npm install
react-native run-ios or react-native run-android| Prop | Type | Default | Description |
|---|---|---|---|
buttonsBackgroundColor |
PropTypes.string |
'#CCCFD6' | background color of buttons bar |
buttonsTextColor |
PropTypes.string |
'#006BFF' | text color of buttons in buttons bar |
buttonsTextSize |
PropTypes.number |
undefined | text size of buttons in buttons bar |
cancelKeyText |
PropTypes.string |
'Cancel' | text of cancel button in buttons bar |
keyboardBackgroundColor |
PropTypes.string |
'#FFFFFF' | background color of picker keyboard |
mode |
PropTypes.string |
'dialog' | Picker mode on Android, 'dialog' or 'dropdown' |
onBeginEditing |
PropTypes.func |
undefined | function that is called when keyboard is opened |
onEndEditing |
PropTypes.func |
undefined | function that is called when input is canceled |
onSubmitEditing |
PropTypes.func |
undefined | function that is called when input is submitted |
options |
PropTypes.array |
[{ value: 0: label: '0'}] | picker options |
submitKeyText |
PropTypes.string |
'Done' | Changes the text of the submit button |
value |
PropTypes.any |
undefined | initial selected value |
style |
PropTypes.object |
undefined | View#style |
labelStyle |
PropTypes.object |
undefined | Text#style |
| Name | Description |
|---|---|
focus |
toggles the picker keyboard |
MIT.

