https://github.com/danielweinmann/react-native-picker-dropdown
A dropdown that uses React Native's Picker for Android and ActionSheetIOS for iOS
https://github.com/danielweinmann/react-native-picker-dropdown
Last synced: 10 months ago
JSON representation
A dropdown that uses React Native's Picker for Android and ActionSheetIOS for iOS
- Host: GitHub
- URL: https://github.com/danielweinmann/react-native-picker-dropdown
- Owner: danielweinmann
- License: mit
- Created: 2017-05-20T14:38:08.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2022-04-28T19:37:59.000Z (about 4 years ago)
- Last Synced: 2025-08-09T14:44:14.893Z (10 months ago)
- Language: JavaScript
- Size: 422 KB
- Stars: 28
- Watchers: 1
- Forks: 20
- Open Issues: 28
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# react-native-picker-dropdown
A dropdown that uses React Native's Picker for Android and ActionSheetIOS for iOS
## Installation
```yarn add react-native-picker-dropdown```
or
```npm install react-native-picker-dropdown --save```
## Usage
It uses the exact same API as [React Native's Picker](https://facebook.github.io/react-native/docs/picker.html), but it shows a dropdown for iOS that opens an ActionSheetIOS with the items when clicked.
The only exception is that we have 2 style props:
1. `textStyle`: used to customize the text and the arrow icon of the Picker. On Android, the arrow icon does not change and other styles are also not applied due to limitations on React Native's `Picker` component.
2. `style`: used to customize a view that we put around the picker.
## Examples
### Simplest example
[Run this example on Expo](https://exp.host/@danielweinmann/react-native-picker-dropdown-simplest)
[Read the source code](examples/simplest/App.js)
### Styled example
[Run this example on Expo](https://exp.host/@danielweinmann/react-native-picker-dropdown-styled)
[Read the source code](examples/styled/App.js)
## Contributing
Please create issues and send pull requests!
## License
[MIT](LICENSE)