Skip to content

victorpopkov/react-ui-icheck

Repository files navigation

react-ui-icheck

npm package CI Codecov Code Climate Libraries.io

iCheck customizable checkboxes and radios built with React.

Overview

A small library to create customizable checkboxes and radios which can either use iCheck skins or custom ones.

screenshot

This library has been originally intended to be a luqin/react-icheck fork. But, after diving into the original code it became more convenient to create a new one as a drop-in replacement with some additional changes:

  • Added onBlur and onFocus label events to accompany onMouseOut and onMouseOver
  • Added support for labels as Checkbox and Radio children
  • Introduced CheckboxGroup similar to the RadioGroup
  • Introduced labelTag and labelTagClassName properties for Checkbox and Radio
  • Introduced radioWrapClassName and radioWrapTag properties for RadioGroup
  • Moved corresponding properties from EnchantedSwitch to Checkbox and Radio
  • Removed EnchantedSwitch in favour of Input and Label
  • Removed refs usage to follow the "Don't Overuse Refs" guide

Demo

The demo can be found on the website alongside with the source here.

Installation

The library can be installed like any other npm package.

If you are planning to use your custom skin(s):

$ npm install react-ui-icheck --save
# or
$ yarn add react-ui-icheck

However, if you are planning to use iCheck skin(s) you will need to install the icheck package as well:

$ npm install react-ui-icheck icheck --save
# or
$ yarn add react-ui-icheck icheck

License

Released under the MIT License.