# react-native-picker-checkbox

> A simple picker component with checkbox list for React-Native

Latest version **2.0.2** (published 2019-10-17) · Apache 2.0 license · 272 weekly downloads

## Install

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

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 2.0.2 |
| Published | 2019-10-17 |
| First published | 2018-07-10 |
| Weekly downloads | 272 |
| License | Apache 2.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 88.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 9 |
| Author | Vinícius Wovst |
| Maintainers | viniciuswovst |
| Keywords | react-component, ios, android, react-native, picker, checkbox, react |

## Links

- npm: https://www.npmjs.com/package/react-native-picker-checkbox
- Repository: https://github.com/ViniciusWovst/react-native-picker-checkbox
- Homepage: https://github.com/ViniciusWovst/react-native-picker-checkbox#readme
- Issues: https://github.com/ViniciusWovst/react-native-picker-checkbox/issues
- npm.io page: https://npm.io/package/react-native-picker-checkbox

## Dependencies (2)

- [prop-types](https://npm.io/package/prop-types.md) ^15.6.0
- [@expo/vector-icons](https://npm.io/package/@expo/vector-icons.md) ^10.0.6

## 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

- 2.0.2 (latest) — 2019-10-17
- 2.0.1 — 2019-05-18
- 2.0.0 — 2019-05-18
- 1.0.9 — 2019-05-17
- 1.0.8 — 2018-10-20
- 1.0.7 — 2018-10-20
- 1.0.6 — 2018-07-17
- 1.0.5 — 2018-07-10
- 1.0.4 — 2018-07-10
- 1.0.3 — 2018-07-10
- 1.0.2 — 2018-07-10
- 1.0.1 — 2018-07-10
- 1.0.0 — 2018-07-10

## README

# react-native-picker-checkbox

A simple picker component with checkbox list for React-Native.

[![npm version](https://badge.fury.io/js/react-native-picker-checkbox.svg)](https://www.npmjs.com/package/react-native-picker-checkbox)
[![npm](https://img.shields.io/npm/dm/react-native-picker-checkbox.svg)]()

# Contents

- [Example](#example)
- [Installation](#installation)
- [Properties](#properties)

![ui3](./docs/ExampleImage.png)
![ui4](./docs/ExampleImage2.png)

# Example
```sh
$ cd example
$ npm i
$ react-native run-ios   // For ios
$ react-native run-android   // For Android
```

# Installation
``npm install react-native-picker-checkbox --save``

# Usage
```javascript
  import PickerCheckBox from 'react-native-picker-checkbox';

  handleConfirm(pItems){
    console.log('pItems =>', pItems);
  }

  const items = [
    {
      itemKey:1,
      itemDescription:'Item 1'
      },
    {
      itemKey:2,
      itemDescription:'Item 2'
      },
    {
      itemKey:3,
      itemDescription:'Item 3'
      }
  ];

  render() {
    return(
      <PickerCheckBox
        data={items}
        headerComponent={<Text style={{fontSize:25}} >items</Text>}
        OnConfirm={(pItems) => this.handleConfirm(pItems)}
        ConfirmButtonTitle='OK'
        DescriptionField='itemDescription'
        KeyField='itemKey'
        placeholder='select some items'
        arrowColor='#FFD740'
        arrowSize={10}
        placeholderSelectedItems ='$count selected item(s)'
        />
    )
  }
```

# Properties

| Name | Type | Description | Default | Optional
| ------------ | ------------- | ------------ |------------ |------------ |
| `data` | array  | Json with id and description | null | false
| ```headerComponent``` | component  | Header component | null | true
| ```ConfirmButtonTitle``` | String  | confirm button's title | confirm | true
| ```DescriptionField``` | string  | Description Field of data object | null | false
| ```KeyField``` | string  | key Field | null | false
| `placeholder` | string | The text that will be rendered before items has been selected | null | true
| ```containerStyle``` | object  | picker container style | null | true
| ```arrowColor``` | string  | Arrow Color | #000 | true
| ```arrowSize``` | number  | Arrow Size | 8 | true
| ```dividerColor``` | string  | Divider Color | #EEEEEE | true
| ```dividerVisible``` | boolean  | Division between header and content  | true | true
| ```placeholderSelectedItems``` | string  | Placeholder when there is selected item  | 
| ```checkedItems``` | JSON  | items checked that will show when open the picker  | null | true


# Contributing

If you'd like to see something added or changed to this module please open a new GitHub issue. Pull requests are always welcome.

# License

 - [Apache-2.0](https://github.com/ViniciusWovst/react-native-picker-checkbox/blob/master/LICENSE). Vinicius Wovst

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