# react-icon-checkbox

> Icon checkbox component for react

Latest version **1.0.1** (published 2021-03-14) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-icon-checkbox
pnpm add react-icon-checkbox
yarn add react-icon-checkbox
bun add react-icon-checkbox
```

## 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.1 |
| Published | 2021-03-14 |
| First published | 2018-08-21 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Vimal Atreya Ramaka |
| Maintainers | vimalramaka |
| Keywords | react, checkbox, like, favorite |

## Links

- npm: https://www.npmjs.com/package/react-icon-checkbox
- Repository: https://github.com/var/react-icon-checkbox
- Issues: https://github.com/var/react-icon-checkbox/issues
- npm.io page: https://npm.io/package/react-icon-checkbox

## 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.1 (latest) — 2021-03-14
- 1.0.0 — 2021-03-14
- 0.2.4 — 2018-08-22
- 0.2.3 — 2018-08-22
- 0.2.2 — 2018-08-22
- 0.2.1 — 2018-08-22
- 0.2.0 — 2018-08-22
- 0.1.0 — 2018-08-21

## README

# react-icon-checkbox
A quick component to build instagram-esque like or heart or favorite button for your application. Or can also be used for building custom toggles or anything that a checkbox can do.

# Install
`npm install react-icon-checkbox --save`

# Usage 
```
import React from "react";

import { IconCheckbox } from "react-icon-checkbox";

class App extends React.Component {

    constructor(){
        this.state = {
            checked = false
        }
    }
    
    _onCheckboxClicked = () => {
        this.setState({checked: !this.state.checked});
    }

  render() {
    return (
      <IconCheckbox checked={this.state.checked} 
                    checkedIcon={<Icon type="heart" />} 
                    uncheckedIcon={<Icon type="heart-o" />} 
                    onClick={this._onCheckboxClicked} />
    );
  }
}

export default App;

```

# Props

| props                 | type                    | default  |
|-----------------------|-------------------------|----------|
| checked               | boolean                 | false    |
| onClick               | func                    |          |
| checkedIcon           | string / func / element |          |
| uncheckedIcon         | string / func / element |          |
| iconContainerStyle    | style                   |          |
| iconContainerClassName| string                  |          |

# Who's using it 
* [Bazr](https://bazr.io)

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