Socket
Socket
Sign inDemoInstall

rc-switch

Package Overview
Dependencies
10
Maintainers
7
Versions
34
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    rc-switch

switch ui component for react


Version published
Weekly downloads
1.2M
increased by6.45%
Maintainers
7
Install size
554 kB
Created
Weekly downloads
 

Readme

Source

rc-switch


Switch ui component for react.

NPM version npm download build status Test coverage bundle size

Install

rc-switch

Usage

import Switch from 'rc-switch';

export default () => <Switch />;

Compatibility

IE / Edge
IE / Edge
Firefox
Firefox
Chrome
Chrome
Safari
Safari
Electron
Electron
IE11, Edgelast 2 versionslast 2 versionslast 2 versionslast 2 versions

API

PropertyTypeDefaultDescription
prefixClsStringrc-switch
classNameString''additional class name of root node
checkedbooleanfalsewhether switch is checked
defaultCheckedbooleanfalsewhether switch is checked on init
onChangeFunction(checked, event)called when switch is checked or unchecked
tabIndexnumbertab-index of switch node
onClickFunction(checked, event)called when switch is clicked
autoFocusbooleanget focus when mounts
disabledbooleanfalsewhether switch is disabled
loadingIconReact.ReactNodespecific the extra node. generally used in loading icon.

Development

npm install
npm start

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

License

rc-switch is released under the MIT license.

Keywords

FAQs

Last updated on 23 Apr 2023

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc