Giter VIP home page Giter VIP logo

react-native-checkbox-card's Introduction

React Native Checkbox Card

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

npm version npm Platform - Android and iOS License: MIT styled with 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:

npm i react-native-checkbox-card

Peer Dependencies

IMPORTANT! You need install them
"@freakycoder/react-native-bounceable": "^0.2.0",

Usage

Import

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

Fundamental Usage

<RNCheckboxCard
  text="Banana"
  onPress={(checked: boolean) => console.log("Checked: ", checked)}
/>

Quantity Prop Usage

<RNCheckboxCard
  darkMode
  text="Banana"
  quantity="x2"
  enableQuantityText
  onPress={(checked: boolean) => 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
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

  • LICENSE
  • Write an article about the lib on Medium

Credits

Heavily inspired by Eugeniusz Eudokimow, 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.

react-native-checkbox-card's People

Contributors

wrathchaos avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.