rc-switch
switch ui component for react
Last updated 8 years ago by afc163 .
MIT · Repository · Bugs · Original npm
$ cnpm install rc-switch 
SYNC missed versions from official npm registry.

rc-switch


switch ui component for react.

NPM version build status Test coverage gemnasium deps node version npm download

Feature

  • support ie8,ie8+,chrome,firefox,safari

install

rc-switch

Usage

import ReactDOM from 'react-dom';
import Switch from 'rc-switch';

ReactDOM.render(<Switch />, container);

API

props

name type default description
prefixCls String rc-switch
className String '' additional class name of root node
checked boolean false whether switch is checked
defaultChecked boolean false whether switch is checked on init
onChange Function(checked, event) called when switch is checked or unchecked
tabIndex number tab-index of switch node
onClick Function(checked, event) called when switch is clicked
autoFocus boolean get focus when mounts
disabled boolean false whether switch is disabled
loadingIcon React.ReactNode specific the extra node. generally used in loading icon.

Development

npm install
npm start

Online demo: http://react-component.github.io/switch/examples/

License

rc-switch is released under the MIT license.

Current Tags

  • 4.0.0-alpha.0                                ...           alpha (3 years ago)
  • 4.0.0                                ...           latest (3 years ago)

15 Versions

  • 4.0.0-alpha.0                                ...           3 years ago
  • 4.0.0                                ...           3 years ago
  • 3.2.2                                ...           5 years ago
  • 1.9.2                                ...           5 years ago
  • 3.2.1                                ...           5 years ago
  • 3.1.0                                ...           5 years ago
  • 3.2.0                                ...           5 years ago
  • 2.0.0                                ...           5 years ago
  • 1.3.3                                ...           10 years ago
  • 1.6.0                                ...           8 years ago
  • 1.5.1                                ...           8 years ago
  • 1.8.0                                ...           7 years ago
  • 1.5.3                                ...           8 years ago
  • 1.4.4                                ...           8 years ago
  • 1.9.0                                ...           7 years ago
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (2)
Dev Dependencies (6)
Dependents (0)
None

Copyright 2013 - present © cnpmjs.org