xs-checkbox
Simple CheckBox, with
- user customizable icons
- check/unchecked label text
- returns expected e.target object for controlled forms
Installation
Use npm, yarn os other npm package manager you choose to install xs-checkbox
.
# npm npm i -S xs-checkbox # yarn yarn add xs-checkbox
Usage
Three examples below, show
- Simplest: default checkmark
- Custom Icon, shows when 'checked'
- Check & unchecked icons, checked & unchecked text
... { // do something with checked value console}... <CheckBox checked text='Default checkmark' name='Checkbox1' onChange=thishandleCheckBoxChange/> <CheckBox checked text='Much-room to grow' name='Checkbox3' checkedIcon='🍄' onChange=thishandleCheckBoxChange/> <CheckBox checked name='emperorsChoice' checkedIcon='👍🏻' unCheckedIcon='👎🏻' checkedText='Yeah, baby!' unCheckedText='Off with his head!' onChange=thishandleCheckBoxChange/>
Style
Using component element classes
Contributing
Issues and Pull requests are always welcome. Please keep in mind that there is a code of conduct.
To get started, install the dev dependencies and build the exports if needed.
# install dependencies npm install # build the project for distribution npm run build:prod