
Security News
MCP Community Begins Work on Official MCP Metaregistry
The MCP community is launching an official registry to standardize AI tool discovery and let agents dynamically find and install MCP servers.
react-switch-button2
Advanced tools
A React UI Component to display an awesome Switch (swipe) Button control forked from http://gfazioli.github.io/react-switch-button/
A Switch control built with and for React
Example: http://gfazioli.github.io/react-switch-button Live demo: Online Demo
You can use React Switch Button by using NPM and include it in your own React build process (using Browserify, etc).
npm install react-switch-button --save
At this point you can import react-switch-button
and its styles in your application as follows:
import SwitchButton from 'react-switch-button';
// Be sure to include styles at some point, probably during your bootstrapping
import 'react-switch-button/dist/react-switch-button.css';
or
const SwitchButton = require( 'react-switch-button' );
and then include the css in your HTML page.
Of course, you can also use the standalone build by including react-switch-button.js
and react-switch-button.css
in your page. (If you do this though you'll also need to include the dependencies.) For example:
<script src="https://cdnjs.cloudflare.com/ajax/libs/react/15.3.1/react.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/react/15.3.1/react-dom.min.js"></script>
<script src="https://unpkg.com/classnames/index.js"></script>
<script src="https://unpkg.com/react-switch-button/dist/react-switch-button.js"></script>
<link rel="stylesheet" href="https://unpkg.com/react-switch-button/dist/react-switch-button.css">
Thanks for any your contribute.
MIT Licensed. Copyright (c) Giovambattista Fazioli 2017.
FAQs
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
The MCP community is launching an official registry to standardize AI tool discovery and let agents dynamically find and install MCP servers.
Research
Security News
Socket uncovers an npm Trojan stealing crypto wallets and BullX credentials via obfuscated code and Telegram exfiltration.
Research
Security News
Malicious npm packages posing as developer tools target macOS Cursor IDE users, stealing credentials and modifying files to gain persistent backdoor access.