Skip to content
This repository has been archived by the owner on Apr 23, 2024. It is now read-only.

A React Native SelectInput for iOS (+Android) which shows the picker as a keyboard.

License

Notifications You must be signed in to change notification settings

Ventanex/react-native-select-input-ios

 
 

Repository files navigation

npm version npm downloads Build Status Code Climate Issue Count

React Native SelectInputIOS

A React Native SelectInput for iOS (+Android) which shows the picker as a keyboard.

Supported versions

  • v1.1.3 requires RN>=0.49
  • Use v1.1.2 for older RN versions.

Installation

Installation can be done through npm or yarn:

npm i react-native-select-input-ios --save
yarn add react-native-select-input-ios

Preview

          

Usage

Import 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');

Example:

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

Props

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

Methods

Name Description
focus toggles the picker keyboard

License

MIT.

About

A React Native SelectInput for iOS (+Android) which shows the picker as a keyboard.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 74.9%
  • Objective-C 13.8%
  • Python 5.4%
  • Java 4.1%
  • Shell 1.8%