A highly customizable toggle button (switch) component for React applications.
1. Install and import the switch component.
# Yarn
$ yarn add react-styled-toggle
# NPM
$ npm i react-styled-toggleimport Toggle from 'react-styled-toggle';
2. Create a basic toggle switch.
<Toggle />
3. Customize the toggle switch with the following props.
checked: boolean
disabled: boolean
onChange: () => void
backgroundColorChecked: string
backgroundColorUnchecked: string
backgroundColorButton: string
name: string
value: string
labelRight: string
labelLeft: string
sliderWidth: number
sliderHeight: number
width: number
height: number
translate: any
Author: guillaumemorin
Live Demo: View The Demo
Download Link: Download The Source Code
Official Website: https://github.com/guillaumemorin/react-styled-toggle
License: MIT