# react-toggle-peiss

> react-toggle-peiss

Latest version **1.0.2** (published 2022-10-12) · ISC license · 0 weekly downloads

## Install

```sh
npm install react-toggle-peiss
pnpm add react-toggle-peiss
yarn add react-toggle-peiss
bun add react-toggle-peiss
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2022-10-12 |
| First published | 2022-10-12 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 8.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | pei |
| Maintainers | fangmin26 |
| Keywords | javascript, react, react-toggle |

## Links

- npm: https://www.npmjs.com/package/react-toggle-peiss
- npm.io page: https://npm.io/package/react-toggle-peiss

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 1.0.2 (latest) — 2022-10-12
- 1.0.1 — 2022-10-12

## README

# 0. image
![react-toggle-peiss](https://user-images.githubusercontent.com/79704363/195235381-e0c41240-5794-45c9-a16d-a9f3a47ad5ef.png)
# 1.you can install to type to terminal.
```
  npm i react-toggle-peiss
  npm start
```
# 2.just import this top of your code.
```
  import ReactToggle from "react-toggle-peiss"
```
## 3.and then you can use like this
```
    <ReactToggle
      setToggleState={false}
      onToggle={(boolean)=>console.log(boolean)}
      containerWidth={"44px"}
      containerHeight={"24px"}
      containerBG={"#61be82"}
      buttonWidth={"16px"}
      buttonHeight={"16px"}
      buttonBG={"#fafafa"}
      buttonMove={"24px"}
    />
```
## 3-1.real code sample
```
import React from 'react'
import ReactToggle from "react-toggle-peiss"
const ToggleTest = () => {
  return (
    <div>
      <ReactToggle
        setToggleState={false}
        onToggle={(boolean)=>console.log(boolean)}
        containerWidth={"44px"}
        containerHeight={"24px"}
        containerBG={"#61be82"}
        buttonWidth={"16px"}
        buttonHeight={"16px"}
        buttonBG={"#fafafa"}
        buttonMove={"24px"}
      />
    </div>
  )
}

export default ToggleTest
```
### 4. this is thte param description
```
  setToggleState: current state value
  onToggle: you can set the event or catch the param inside when you toggled
  containerWidth: width of toggle container
  containerHeight: height of toggle container
  containerBG: background color of toggle container
  buttonWidth: width of toggle button
  buttonHeight: height of toggle button
  buttonBG: background color of toggle background
  buttonMove: put inside the length that can move from your left side
```

---
_Source: https://npm.io/package/react-toggle-peiss · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
