React styled toggle

npm version npm version code style: prettier style: styled-components jest

Demo

codesandebox

storybook

Installation

yarn add react-styled-toggle

Usage

import Toggle from 'react-styled-toggle';

render(){
	return <Toggle />
}

Development

yarn storybook

Build

yarn build

Props

propertypropTyperequireddefaultdescription
checkedbool--
disabledbool--
onChangefunc--
backgroundColorCheckedstring-"'#2193F3'"
backgroundColorUncheckedstring-"'#ccc'"
backgroundColorButtonstring-"'#fff'"
namestring--
valuestring--
labelRightstring--
labelLeftstring--
sliderWidthnumber-"26"
sliderHeightnumber-"26"
widthnumber-"60"
heightnumber-"34"
translatenumber-"26"

Last updated

v1.0.18

Install

npm install react-styled-toggle
yarn add react-styled-toggle

BUNDLE SIZE

Not Available

DOWNLOAD TIME

Not Available

CDNs

extras

Contributors

  • guillaumemorin