# react-native-checkbox-view

> Checkbox component for react native for on iOS and Android.

Latest version **1.0.2** (published 2018-08-03) · MIT license · 0 weekly downloads

## Install

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

## 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.2 |
| Published | 2018-08-03 |
| First published | 2018-08-03 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 395.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Aamir ali |
| Maintainers | aamirali86 |
| Keywords | react-native, checkbox, custom-views, reactjs |

## Links

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

## Alternatives

- [@opentelemetry/exporter-zipkin](https://npm.io/package/@opentelemetry/exporter-zipkin.md) — 14.8M weekly downloads
- [pusher-js](https://npm.io/package/pusher-js.md) — 2.0M weekly downloads
- [browserify](https://npm.io/package/browserify.md) — 1.7M weekly downloads
- [sqs-consumer](https://npm.io/package/sqs-consumer.md) — 1.7M weekly downloads
- [@sanity/eventsource](https://npm.io/package/@sanity/eventsource.md) — 930.8K weekly downloads

## Recent versions

- 1.0.2 (latest) — 2018-08-03
- 1.0.1 — 2018-08-03
- 1.0.0 — 2018-08-03

## README

# react-native-checkbox-view

### Installation

`$ npm install react-native-checkbox-view --save`


## Usage
```javascript
import Checkbox from 'react-native-checkbox-view';
```  

## Demo
* [Example](https://github.com/Aamirali86/react-native-checkbox-view/tree/master/example)

![Screenshots](https://github.com/Aamirali86/react-native-checkbox-view/blob/master/example/screenshots/checkbox.gif)

## Getting started  

Add `react-native-checkbox-view` to your js file.

`import CheckBox from 'react-native-checkbox-view'`  

Inside your component's render method, use CheckBox:   

```javascript
  <Checkbox
    style={{padding: 5}}
    checkBoxColor={color}
    onClick={(data) => this.onClick(data)} />
```

Then you can use it like this:   


### Basic usage  

```javascript
 <Checkbox
    style={{padding: 5}}
    checkBoxColor={color}
    onClick={(data) => this.onClick(data)} />
 ```

### Custom CheckBox   

```javascript
  renderCheckBox(data, checkedImage, unCheckedImage) {
    return (
      <Checkbox
        style={{padding: 5}}
        checkedImage={checkedImage}
        unCheckedImage={unCheckedImage}
        onClick={(data) => this.onClick(data)} />
  }
```

## API


Props              | Type     | Optional | Default     | Description
----------------- | -------- | -------- | ----------- | -----------
style  | ViewPropTypes.style  | true |   |   Custom style checkbox
checkedImage  |  PropTypes.element  | true  | Default image | Custom  checked Image
unCheckedImage  |  PropTypes.element  | true  |  Default image  | Custom  unchecked Image
isChecked  |  PropTypes.bool |  false  |  false  | checkbox checked state
onClick   |  PropTypes.func.isRequired |  false  |  | callback  function
disabled  |  PropTypes.bool            | true  |  false | Disable the checkbox button
checkBoxColor | PropTypes.string | true |   | Tint color of the checkbox image (this props is for both checked and unchecked state)
checkedCheckBoxColor | PropTypes.string | true |   | Tint color of the checked state checkbox image (this prop will override value of `checkBoxColor` for checked state)
uncheckedCheckBoxColor | PropTypes.string | true |   | Tint color of the unchecked state checkbox image (this prop will override value of `checkBoxColor` for unchecked state)

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