react-native-pro-picker
v1.3.7
Published
React Native Pro Picker gives you the option to have an ActionSheet-based picker in iOS while maintaining the basic one for android and the web.
Downloads
25
Maintainers
Readme
Install 🧰
You can install react-native-pro-picker by running the following command
npm install react-native-pro-picker
Usage 💡
- Add the following import statement:
import { ProPicker, ProPickerOption } from 'react-native-pro-picker';
- Add some options:
let options : ProPickerOption[] = [
{
id: 1,
value: "js",
label: "JavaScript"
},
{
id: 2,
value: "ts",
label: "Typescript"
},
{
id: 3,
value: "kt",
label: "Kotlin"
},
];
- Add the component:
<ProPicker items={options} onItemSelected={(item) => {
// Use the selected item.
}}/>
- Customize your picker with the customization options.
Necessary Attributes ⚠️
| Attribute | Description | Type | |----------------|:-------------------------------------------------------------:|-------------------| | items | The options to select from. Should be of type ProPickerOption | ProPickerOption[] | | onItemSelected | Callback for when the user selects an item. | () => void |
Customizable Attributes 🕹️
Try it yourself 📱
Try it on your device, by scanning this QR on the Expo Go app:
(QR not showing? Visit the Expo Project Page)
Contributing 🍰
If you want me to improve this package, feel free to reach out to me, and I'll gladly update it.
Maintainers 👷
License ⚖️
MIT