negativetwelve / react-ios-switch

React switch component http://clari.github.io/react-ios-switch

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

React iOS Switch

Demo

Features

  • Click to toggle
  • Draggable handle
  • Customizable colors
  • Animation
  • Hidden input for interaction with labels

Usage

import 'react-ios-switch/build/bundle.css';
import Switch from 'react-ios-switch';

<Switch
  checked={<bool>}
  disabled={<bool>}
  handleColor={<color>}
  offColor={<color>}
  onChange={checked => ...}
  onColor={<color>}
  pendingOffColor={<color>}
/>

Setup

npm install
npm start
# Visit http://localhost:8080

References

About

React switch component http://clari.github.io/react-ios-switch

License:MIT License


Languages

Language:JavaScript 73.0%Language:CSS 22.9%Language:HTML 4.0%