{"name":"@rc-component/switch","version":"1.0.1","keywords":["react","react-component","react-switch","switch"],"license":"MIT","_id":"@rc-component/switch@1.0.1","maintainers":[{"name":"zombiej","email":"smith3816@gmail.com"},{"name":"afc163","email":"afc163@gmail.com"},{"name":"madccc","email":"1075746765@qq.com"},{"name":"peachscript","email":"scdzwyxst@gmail.com"},{"name":"chenshuai2144","email":"wasd2144@hotmail.com"}],"homepage":"http://github.com/react-component/switch","bugs":{"url":"http://github.com/react-component/switch/issues"},"dist":{"shasum":"455dddb0549f2bb55b85ecc12e1716f96955a064","tarball":"http://registry-npm.ywwl.com/@rc-component/switch/download/@rc-component/switch-1.0.1.tgz","fileCount":8,"integrity":"sha512-wADOlMU8xUkNHmLiv0eLSxZ9j4W1eaj9GH7mWYbSKOI/N1CbdZtz6kIllT5gdBdN4GBEQj86OiGte46Ot0xj3Q==","signatures":[{"sig":"MEUCIQDJdmne6JEvHdiWZOW81Ij9vc8pv3/KmO/5/4emzGVuwQIgf1j9rButBRblSQuRJ+Xat5hZJFS4V/LOopGKhIgSV+I=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":19971,"size":5112,"noattachment":false,"key":"/@rc-component/switch/-/@rc-component/switch-1.0.1.tgz"},"main":"lib/index","types":"./lib/index.d.ts","module":"./es/index","gitHead":"8e2a58548048ad56a2ce322200796d41133a4379","scripts":{"lint":"eslint .","test":"umi-test","start":"dumi dev","compile":"father build && lessc assets/index.less assets/index.css","prepare":"husky install && dumi setup","gh-pages":"npm run docs:build && npm run docs:deploy","docs:build":"dumi build","docs:deploy":"gh-pages -d .doc","lint-staged":"lint-staged","postpublish":"npm run gh-pages","prepublishOnly":"npm run compile && rc-np"},"_npmUser":{"name":"zombiej","email":"smith3816@gmail.com"},"repository":{"url":"git+ssh://git@github.com/react-component/switch.git","type":"git"},"_npmVersion":"10.9.2","description":"switch ui component for react","directories":{},"lint-staged":{"**/*.{js,jsx,tsx,ts,md,json}":["prettier --write"]},"_nodeVersion":"22.15.1","dependencies":{"classnames":"^2.2.1","@rc-component/util":"^1.3.0"},"_hasShrinkwrap":false,"devDependencies":{"dumi":"^2.0.0","less":"^4.1.3","husky":"^8.0.1","react":"^16.0.0","enzyme":"^3.0.0","eslint":"^8.55.0","father":"^4.0.0","cheerio":"1.0.0-rc.12","gh-pages":"^6.1.0","prettier":"^3.1.0","umi-test":"^1.9.7","react-dom":"^16.0.0","@types/jest":"^29.4.0","lint-staged":"^15.1.0","@umijs/fabric":"^3.0.0","enzyme-to-json":"^3.0.0","@rc-component/np":"^1.0.3","@types/classnames":"^2.2.10","eslint-plugin-jest":"^27.6.0","react-test-renderer":"^16.0.0","eslint-plugin-unicorn":"^49.0.0","enzyme-adapter-react-16":"^1.0.1","@rc-component/father-plugin":"^2.0.0"},"peerDependencies":{"react":">=16.9.0","react-dom":">=16.9.0"},"_npmOperationalInternal":{"tmp":"tmp/switch_1.0.1_1758006871045_0.5645737717504784","host":"s3://npm-registry-packages-npm-production"},"readme":"# rc-switch\n\n---\n\nSwitch ui component for react.\n\n[![NPM version][npm-image]][npm-url]\n[![npm download][download-image]][download-url]\n[![build status][github-actions-image]][github-actions-url]\n[![Test coverage][codecov-image]][codecov-url]\n[![bundle size][bundlephobia-image]][bundlephobia-url]\n\n[npm-image]: http://img.shields.io/npm/v/rc-switch.svg?style=flat-square\n[npm-url]: http://npmjs.org/package/rc-switch\n[travis-image]: https://img.shields.io/travis/react-component/switch/master?style=flat-square\n[travis-url]: https://travis-ci.com/react-component/switch\n[github-actions-image]: https://github.com/react-component/switch/workflows/CI/badge.svg\n[github-actions-url]: https://github.com/react-component/switch/actions\n[codecov-image]: https://img.shields.io/codecov/c/github/react-component/switch/master.svg?style=flat-square\n[codecov-url]: https://app.codecov.io/gh/react-component/switch\n[david-url]: https://david-dm.org/react-component/switch\n[david-image]: https://david-dm.org/react-component/switch/status.svg?style=flat-square\n[david-dev-url]: https://david-dm.org/react-component/switch?type=dev\n[david-dev-image]: https://david-dm.org/react-component/switch/dev-status.svg?style=flat-square\n[download-image]: https://img.shields.io/npm/dm/rc-switch.svg?style=flat-square\n[download-url]: https://npmjs.org/package/rc-switch\n[bundlephobia-url]: https://bundlephobia.com/package/rc-switch\n[bundlephobia-image]: https://badgen.net/bundlephobia/minzip/rc-switch\n\n## Install\n\n[![rc-switch](https://nodei.co/npm/rc-switch.png)](https://npmjs.org/package/rc-switch)\n\n## Usage\n\n```js\nimport Switch from 'rc-switch';\n\nexport default () => <Switch />;\n```\n\n## Compatibility\n\n| [<img src=\"https://raw.githubusercontent.com/alrra/browser-logos/master/src/edge/edge_48x48.png\" alt=\"IE / Edge\" width=\"24px\" height=\"24px\" />](http://godban.github.io/browsers-support-badges/)<br>IE / Edge | [<img src=\"https://raw.githubusercontent.com/alrra/browser-logos/master/src/firefox/firefox_48x48.png\" alt=\"Firefox\" width=\"24px\" height=\"24px\" />](http://godban.github.io/browsers-support-badges/)<br>Firefox | [<img src=\"https://raw.githubusercontent.com/alrra/browser-logos/master/src/chrome/chrome_48x48.png\" alt=\"Chrome\" width=\"24px\" height=\"24px\" />](http://godban.github.io/browsers-support-badges/)<br>Chrome | [<img src=\"https://raw.githubusercontent.com/alrra/browser-logos/master/src/safari/safari_48x48.png\" alt=\"Safari\" width=\"24px\" height=\"24px\" />](http://godban.github.io/browsers-support-badges/)<br>Safari | [<img src=\"https://raw.githubusercontent.com/alrra/browser-logos/master/src/electron/electron_48x48.png\" alt=\"Electron\" width=\"24px\" height=\"24px\" />](http://godban.github.io/browsers-support-badges/)<br>Electron |\n| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| IE11, Edge                                                                                                                                                                                                     | last 2 versions                                                                                                                                                                                                  | last 2 versions                                                                                                                                                                                              | last 2 versions                                                                                                                                                                                              | last 2 versions                                                                                                                                                                                                      |\n\n## API\n\n| Property       | Type                     | Default   | Description                                              |\n| -------------- | ------------------------ | --------- | -------------------------------------------------------- |\n| prefixCls      | String                   | rc-switch |                                                          |\n| className      | String                   | ''        | additional class name of root node                       |\n| checked        | boolean                  | false     | whether switch is checked                                |\n| defaultChecked | boolean                  | false     | whether switch is checked on init                        |\n| onChange       | Function(checked, event) |           | called when switch is checked or unchecked               |\n| tabIndex       | number                   |           | tab-index of switch node                                 |\n| onClick        | Function(checked, event) |           | called when switch is clicked                            |\n| autoFocus      | boolean                  |           | get focus when mounts                                    |\n| disabled       | boolean                  | false     | whether switch is disabled                               |\n| loadingIcon    | React.ReactNode          |           | specific the extra node. generally used in loading icon. |\n\n## Development\n\n```\nnpm install\nnpm start\n```\n\nOnline demo: http://react-component.github.io/switch/\n\n## License\n\nrc-switch is released under the MIT license.\n","publish_time":1758006871247,"_cnpm_publish_time":1758006871247,"dist-tags":{"latest":"1.0.3"}}