Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/guillaumemorin/react-styled-toggle

Customizable toggle button
https://github.com/guillaumemorin/react-styled-toggle

button react styled-components switch toggle typescript

Last synced: 3 days ago
JSON representation

Customizable toggle button

Awesome Lists containing this project

README

        


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


storybook
codesandebox

## Installation

```
pnpm add react-styled-toggle

# or

yarn add react-styled-toggle

# or

npm i react-styled-toggle
```

## Usage

```
import Toggle from 'react-styled-toggle';

```

## Development

```
yarn storybook
```

## Build

```
yarn build
```

## Props



property
Type
default




name
string



value
string



checked
boolean



disabled
boolean



labelRight
string



labelLeft
string



width
number
60


height
number
34


translate
number
26


sliderWidth
number
26


sliderHeight
number
26


backgroundColorChecked
string
#2193F3


backgroundColorUnchecked
string
#ccc


backgroundColorButton
string
#fff


onChange
() => void