Happy-React-switch

Happy-React-switch

A simple switch component

Happy React Switch npm

A simple switch component in React

Installation

yarn add happy-react-switch
# or
npm i happy-react-switch

Caveats

Remember to include

happy-react-switch/style.css
. Otherwise you'll have to include your own styles.

Demo

Edit Happy react Toggle

Options

Switch.propTypes = {
  active: PropTypes.bool.isRequired,
  className: PropTypes.string,
  enabled: PropTypes.bool,
  onClick: PropTypes.func.isRequired,
  small: PropTypes.bool,
};