Giter Site home page Giter Site logo

maslhiro / react-native-animated-checkbox Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jkomyno/react-native-animated-checkbox

1.0 2.0 0.0 50 KB

Minimalistic and customizable <CheckBox /> component for React Native. :white_check_mark:

License: MIT License

JavaScript 100.00%

react-native-animated-checkbox's Introduction

react-native-animated-checkbox

Minimalistic and customizable component for React Native. You can do things like plug in your own check Icon component, toggle the animation and change the style.


Travis npm npm Issue Stats

Installation

  • yarn add react-native-animated-checkbox

Or, if you prefer using npm:

  • npm i -S react-native-animated-checkbox

Available Props

Check the TypeScript type definition file for further info.

Prop Type Default Description
checked bool false if true, renders the check Icon component
animated bool true if true, animates to opacity of the Icon as checked's value changes
duration number 300 animation duration. Considered only if animated === true
style style of the CheckBox parent container View. Check below for the default style definition
color string '#F26F6F' color of the icon, and default color of the parent's borderColor style
iconName string 'check' name prop of react-native-vector-icons
iconSize number 15 size prop of react-native-vector-icons
activeOpacity number 0.7 activeOpacity prop of TouchableOpacity
onPress func null callback called when the CheckBox gets pressed.
children Node null optional Icon component if react-native-vector-icons/FontAwesome doesn't suit your needs.
  const defaultStyle = {
    backgroundColor: 'transparent',
    margin: 2,
    padding: 1,
    borderRadius: 0,
    borderWidth: 2,
    borderColor: this.props.color,
  };

Example

giphy

Contributing

PRs are obviously welcome! :octocat:

Available scripts

  • lint: verify that the eslint configuration is respected

License

MIT

react-native-animated-checkbox's People

Contributors

jkomyno avatar maslhiro avatar turfaa avatar

Stargazers

 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.