lyef / lyef-switch-button

A switch button (on/off) React component.
MIT License
16 stars 4 forks source link

Lyef Switch Button

Build Status Badge size Badge gzip size NPM version

Switch Button

A switch button (on/off) React component.

Demo

Live examples

Installation

$ npm install --save lyef-switch-button

Remember to import the styles on css/main.css folder to your project.

Basic Usage

import SwitchButton from 'lyef-switch-button';

...
render() {
    return (
        <SwitchButton
            id="my-button"
            labelLeft="left"
            labelRight="right"
            isChecked
            disabled
            action={callbackFunction}
        />
    );
}
...

Props

Architecture

We've developed this component using the following boilerplate: lyef-react-component.

To know more about the architecture or if you want to contribute with this component: Contributing Documentation.

License

MIT License @ lyef