# react-native-easy-item-picker

> A simple React Native module purely written in javascript that allows you to show a PickerView to select an item from a list of options for both Android and iOS.

Latest version **1.0.11** (published 2022-04-05) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-native-easy-item-picker
pnpm add react-native-easy-item-picker
yarn add react-native-easy-item-picker
bun add react-native-easy-item-picker
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.11 |
| Published | 2022-04-05 |
| First published | 2022-02-10 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 119.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Jahanzaib Ramzan |
| Maintainers | jahanzaibramzan |
| Keywords | react-native, android, ios, react, native, easy, item, picker, spinner |

## Links

- npm: https://www.npmjs.com/package/react-native-easy-item-picker
- Repository: https://github.com/jahanzaibramzan/react-native-easy-item-picker
- Issues: https://github.com/jahanzaibramzan/react-native-easy-item-picker/issues
- npm.io page: https://npm.io/package/react-native-easy-item-picker

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 1.0.11 (latest) — 2022-04-05
- 1.0.10 — 2022-02-12
- 1.0.9 — 2022-02-12
- 1.0.8 — 2022-02-11
- 1.0.7 — 2022-02-11
- 1.0.6 — 2022-02-11
- 1.0.5 — 2022-02-11
- 1.0.4 — 2022-02-10
- 1.0.3 — 2022-02-10
- 1.0.2 — 2022-02-10
- 1.0.1 — 2022-02-10
- 1.0.0 — 2022-02-10

## README

# react-native-easy-item-picker

A simple React Native module purely written in javascript that allows you to show a PickerView to select an item from a list of options for both Android and iOS.

<!-- ![alt text](https://github.com/jahanzaibramzan/react-native-easy-item-picker/blob/master/demo/screenshots/img1.jpg?raw=true)

![alt text](https://github.com/jahanzaibramzan/react-native-easy-item-picker/blob/master/demo/screenshots/img2.jpg?raw=true) -->

![alt text](https://github.com/jahanzaibramzan/react-native-easy-item-picker/blob/master/demo/screenshots/demo.png?raw=true)


## Getting started

`$ npm install react-native-easy-item-picker --save`

### Mostly automatic installation

`$ react-native link react-native-easy-item-picker`

### Manual installation


#### iOS

1. In XCode, in the project navigator, right click `Libraries` ➜ `Add Files to [your project's name]`
2. Go to `node_modules` ➜ `react-native-easy-item-picker` and add `RNItemPicker.xcodeproj`
3. In XCode, in the project navigator, select your project. Add `libRNItemPicker.a` to your project's `Build Phases` ➜ `Link Binary With Libraries`
4. Run your project (`Cmd+R`)<

#### Android

1. Open up `android/app/src/main/java/[...]/MainActivity.java`
  - Add `import com.reactlibrary.RNItemPickerPackage;` to the imports at the top of the file
  - Add `new RNItemPickerPackage()` to the list returned by the `getPackages()` method
2. Append the following lines to `android/settings.gradle`:
  	```
  	include ':react-native-easy-item-picker'
  	project(':react-native-easy-item-picker').projectDir = new File(rootProject.projectDir, 	'../node_modules/react-native-easy-item-picker/android')
  	```
3. Insert the following lines inside the dependencies block in `android/app/build.gradle`:
  	```
      compile project(':react-native-easy-item-picker')
  	```

## Usage
```javascript
import MyPicker from 'react-native-easy-item-picker'

const mOptions = [
    { key: "Option No 1", value: "opt1" },
    { key: "Option No 2", value: "opt2" },
    { key: "Option No 3", value: "opt3" },
]

	<MyPicker
        title={"Select a link"}
        noSelectionTxt={"Select a link"}

        selectedColor={"#000"}
        unSelectedColor={"#999"}
        arrowColor={"#000"}
        itemTxtColor={"#000"}
        txtFontFamily={{ fontFamily: /*FONT_NAME*/ }}

        titleStyle={{ color: "#000" }}
        bgContainerStyle={{ marginVertical: 20 }}

    	options={mOptions}
        onSelectChange={(item) => { console.log(item) }}
    />
```

---
_Source: https://npm.io/package/react-native-easy-item-picker · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
