zooid-switch
Version:
29 lines (23 loc) • 1.26 kB
Markdown
A React component to render Zooid like switches/toggles.
[](https://travis-ci.org/octoblu/zooid-switch)
[](http://badge.fury.io/js/zooid-switch)
[](https://codeclimate.com/github/octoblu/zooid-switch)
[](http://community-slack.octoblu.com)
```
npm install --save zooid-switch
```
| Prop | Type | Default | Description |
| ----------| -------| --------| -------------------------------------|
| alignLabel| string | left | Sets align property for the switch label. Options: **left**, **right** |
| className | string | | Additional css classes for your switch|
| disabled | bool | false | Makes the switch un-switchable |
| label | string | | Label for the switch |
| onChange | func | | Custom callback function to be fired each time the switch is fired |
| on | bool | false | The current state of the switch |
```jsx
<Switch label="Switch Me On" />
```