An open API service indexing awesome lists of open source software.

https://github.com/wrathchaos/react-native-checkbox-card

Checkbox Card is customizable and animated built-in check state integration for React Native
https://github.com/wrathchaos/react-native-checkbox-card

card card-view checkbox checkbox-card front-end front-end-development react react-native react-native-app react-native-checkbox react-native-checkbox-card react-native-component reactjs view

Last synced: 4 months ago
JSON representation

Checkbox Card is customizable and animated built-in check state integration for React Native

Awesome Lists containing this project

README

        

React Native Checkbox Card

[![Checkbox Card is customizable and animated built-in check state integration for React Native](https://img.shields.io/badge/-Checkbox%20Card%20is%20customizable%20and%20animated%20built--in%20check%20state%20integration%20for%20React%20Native-orange?style=for-the-badge)](https://github.com/WrathChaos/react-native-checkbox-card)

[![npm version](https://img.shields.io/npm/v/react-native-checkbox-card.svg?style=for-the-badge)](https://www.npmjs.com/package/react-native-checkbox-card)
[![npm](https://img.shields.io/npm/dt/react-native-checkbox-card.svg?style=for-the-badge)](https://www.npmjs.com/package/react-native-checkbox-card)
![Platform - Android and iOS](https://img.shields.io/badge/platform-Android%20%7C%20iOS-blue.svg?style=for-the-badge)
[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg?style=for-the-badge)](https://opensource.org/licenses/MIT)
[![styled with prettier](https://img.shields.io/badge/styled_with-prettier-ff69b4.svg?style=for-the-badge)](https://github.com/prettier/prettier)



Checkbox Card


Checkbox Card with Quantity Feature




React Native Checkbox Card


React Native Checkbox Card



Checkbox Card Light Mode




React Native Checkbox Card

# Installation

Add the dependency:

```bash
npm i react-native-checkbox-card
```

## Peer Dependencies

IMPORTANT! You need install them

```json
"@freakycoder/react-native-bounceable": ">= 1.0.3"
```

# Usage

## Import

```jsx
import RNCheckboxCard from "react-native-checkbox-card";
```

## Fundamental Usage

```jsx
console.log("Checked: ", checked)}
/>
```

## Quantity Prop Usage

```jsx
console.log("Checked: ", checked)}
/>
```

# Configuration - Props

### Fundamental Props

| Property | Type | Default | Description |
| -------- | :------: | :-------: | ------------------------------------------------------------------ |
| text | string | undefined | set the main checkbox text |
| onPress | function | default | changes the checkbox's state and returns the changed checked value |

### Featured Props

| Property | Type | Default | Description |
| ------------------ | :-----: | :-------: | --------------------------------------------------------------------- |
| quantity | string | undefined | set the checkbox's quantity text |
| enableQuantityText | boolean | false | MUST use it for using the quantity prop, it enables the quantity text |
| isChecked | boolean | false | initial checked prop |
| darkMode | boolean | false | activates the dark mode |

### Customization & Optional Props

| Property | Type | Default | Description |
| --------------------- | :-------: | :----------------: | --------------------------------------------------------------------------------------- |
| ImageComponent | component | Image | set your own Image component instead of react native's default one such as: `FastImage` |
| rightIconComponent | component | default | set your own component instead of right aligned sort icon image component |
| checkIconComponent | component | default | set your own component instead of check icon image component |
| checkImageSource | image | default | set your own image instead of default check icon |
| sortIconImageSource | image | default | set your own image instead of default sort icon |
| textStyle | style | default | add or override the current text style |
| quantityTextStyle | style | default | add or override the current quantity text style |
| width | number | ScreenWidth \* 0.9 | change the checkbox card's width |
| height | number | 60 | change the checkbox card's height |
| borderRadius | number | 10 | change the checkbox card's border radius |
| backgroundColor | string | default | change the checkbox card's background color |
| checkedTextColor | string | default | change the checked text color |
| uncheckedTextColor | string | default | change the unchecked text color |
| circleSize | number | 25 | change the circle's size (width/height) |
| circleBorderColor | string | default | change the circle's border color |
| circleBorderRadius | number | 25 | change the circle's border radius |
| circleBackgroundColor | number | default | change the circle's background color |

## Future Plans

- [x] ~~LICENSE~~
- [ ] Write an article about the lib on Medium

## Credits

Heavily inspired by [Eugeniusz Eudokimow](https://dribbble.com/shots/11610076-Shopping-List-App/attachments/3231900?mode=media), thank you so much! :)

## Author

FreakyCoder, [email protected]

## License

React Native Checkbox Card is available under the MIT license. See the LICENSE file for more info.