react-styled-toggle
TypeScript icon, indicating that this package has built-in type declarations

1.1.0 • Public • Published

React styled toggle

React Toggle component written in TypeScript and powered by styled-components.

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

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

property propType required default description
checked bool - -
disabled bool - -
onChange func - -
backgroundColorChecked string - "'#2193F3'"
backgroundColorUnchecked string - "'#ccc'"
backgroundColorButton string - "'#fff'"
name string - -
value string - -
labelRight string - -
labelLeft string - -
sliderWidth number - "26"
sliderHeight number - "26"
width number - "60"
height number - "34"
translate number - "26"

Dependents (10)

Package Sidebar

Install

npm i react-styled-toggle

Weekly Downloads

511

Version

1.1.0

License

ISC

Unpacked Size

53.5 kB

Total Files

8

Last publish

Collaborators

  • guillaumemorin