Skip to content

DanLepsa/react-stylable-checkbox

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

react-stylable-checkbox

Stylable checkbox component Build Status

Installation

npm install react-stylable-checkbox

Usage

import CustomCheckbox from 'react-stylable-checkbox';

<CustomCheckbox
  checked={true}
  sign={"check_black"}
  color={"red"}
  onChange={(isChecked)=>{console.log(isChecked)}}
  />

Examples with different options

Options

  • checked (boolean) - state of the checkbox, true by default
  • sign (string) - the sign (choose between "check_white", "check_black", "x_white", "x_black")
  • color (string) - the background color of the checkbox (also supports hex or rgb)
  • onClick (function) - requires callback
  • size (string) - the size of the checkbox in px
  • isHollow (boolean) - the look of the checkbox when unchecked ( isHollow={false} by default)
  • disabled (boolean, default: false) - disabled state for the checkbox; once disabled the onClick callback does not fire anymore

Licence

The code is open-source and available under the MIT Licence.

About

Stylable checkbox component

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published