Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/guillaumemorin/react-styled-toggle
- Owner: guillaumemorin
- Created: 2018-05-09T12:55:26.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2023-10-19T04:31:34.000Z (about 1 year ago)
- Last Synced: 2024-09-19T11:49:45.937Z (about 2 months ago)
- Topics: button, react, styled-components, switch, toggle, typescript
- Language: HTML
- Homepage: https://git.io/fjw6G
- Size: 7.29 MB
- Stars: 14
- Watchers: 4
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
React styled toggle
React Toggle component written in TypeScript and powered by styled-components.
## Demo
## 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