react-simple-checkbox

1.3.0 • Public • Published

React Simple Checkbox

A react checkbox component, with custom color and simple animation

Preview

checkbox.gif

Getting Started

Installing

npm install react-simple-checkbox

Usage

import Checkbox from 'react-simple-checkbox';

Props

name type default description
id String checkbox's id, used for the label's 'for' attribute
color String or Object #4A4A4A checkbox's color. Can be a string or an object with following properties : backgroundColor, borderColor, uncheckedBorderColor and tickColor. (HEX format only)
size number 1 possible values are 1, 2 or 3
tickSize number 2 possible values are 1, 2 or 3
borderThickness number 3 border thickness in pixels, possible values are 1, 2, 3, 4
className String additional class name of root node
delay number 0 delay (in ms) before the animation
backAnimationDuration number 180 duration (in ms) of the checkbox's background transition
tickAnimationDuration number 500 duration (in ms) of the checkbox's tick transition
checked boolean false
onChange Function(isChecked:boolean) called when checkbox is changed. isChecked is the new checkbox value.

Authors

  • Opsolem

License

This project is licensed under the MIT License

Readme

Keywords

Package Sidebar

Install

npm i react-simple-checkbox

Weekly Downloads

502

Version

1.3.0

License

MIT

Unpacked Size

22.8 kB

Total Files

5

Last publish

Collaborators

  • opsolem