Security News
The Dark Side of Open Source
At Node Congress, Socket CEO Feross Aboukhadijeh uncovers the darker aspects of open source, where applications that rely heavily on third-party dependencies can be exploited in supply chain attacks.
rc-switch
Advanced tools
Readme
Switch ui component for react.
import Switch from 'rc-switch';
export default () => <Switch />;
IE / Edge | Firefox | Chrome | Safari | Electron |
---|---|---|---|---|
IE11, Edge | last 2 versions | last 2 versions | last 2 versions | last 2 versions |
Property | 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. |
npm install
npm start
Online demo: http://react-component.github.io/switch/
rc-switch is released under the MIT license.
FAQs
switch ui component for react
The npm package rc-switch receives a total of 1,112,051 weekly downloads. As such, rc-switch popularity was classified as popular.
We found that rc-switch demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 7 open source maintainers collaborating on the project.
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.
Security News
At Node Congress, Socket CEO Feross Aboukhadijeh uncovers the darker aspects of open source, where applications that rely heavily on third-party dependencies can be exploited in supply chain attacks.
Research
Security News
The Socket Research team found this npm package includes code for collecting sensitive developer information, including your operating system username, Git username, and Git email.
Security News
OpenJS is warning of social engineering takeovers targeting open source projects after receiving a credible attempt on the foundation.