Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-switch

Package Overview
Dependencies
Maintainers
1
Versions
33
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-switch - npm Package Versions

124

2.3.1

Diff

Changelog

Source

[2.3.1 - 2018-04-08]

Added

  • Devs now receive a console warning if they have passed an invalid color prop.
yogaboll
published 2.3.0 •

Changelog

Source

[2.3.0 - 2017-12-27]

Added

  • Added TypeScript declaration file
yogaboll
published 2.2.0 •

Changelog

Source

[2.2.0 - 2017-12-19]

Added

  • onChange callback function is now given the id prop that the user has given as the third argument.

Fixed

  • Improved responsiveness on mobile by removing the 300 ms delay when clicking the background.
  • It is no longer possible to select text while holding down the switch.
  • Highlighting effect when clicking the switch on mobile webkit browsers has been removed.
  • Fixed bug where dragging the switch would create a strange shadow on IOS.
yogaboll
published 2.1.0 •

Changelog

Source

[2.1.0 - 2017-11-22]

Added

  • onChange callback function is now given the event that activated the callback as a second argument.
yogaboll
published 2.0.1 •

Changelog

Source

[2.0.1 - 2017-11-03]

Changed

  • prop-types is switched from peerDependency to dependency. This should reduce frustration for devs who don't use prop-types in their project, but shouldn't affect anyone else.
yogaboll
published 2.0.0 •

Changelog

Source

[2.0.0 - 2017-10-31]

Added

  • Added some keywords

Changed

  • Improved demo with best practices for labels.
  • README clarifications
yogaboll
published 2.0.0-rc.2.1 •

Changelog

Source

[2.0.0-rc.2.1]

Fixed

  • Removed some unnecessary files from the package.
yogaboll
published 2.0.0-rc.2 •

Changelog

Source

[2.0.0-rc.2] - 2017-10-13

Refactor

  • The switch no longer uses the opacity hack to transition between color. This involved stacking two divs on top of each other and varying the opacity of the top div. This caused some weird visual artifacts.

Changed

  • onColor and offColor props can now only take colors in the form of '#xxxxxx'. Gradients and rgb(xxx, xxx, xxx) are no longer supported.
  • handleColor prop is replaced by onHandleColor and offHandleColor.
  • The boxShadow the handle gets when selected is now available in the activeBoxShadow prop. The boxShadow prop is now the boxShadow the handle has when it is not selected, and is null by default.

Fixed

  • The switch no longer has a pixel wide gloria of the offColor when checked.

Removed

  • activeHandleColor prop is removed because of lack of usefulness.
yogaboll
published 2.0.0-rc.1 •

Changelog

Source

[2.0.0-rc.1] - 2017-10-08

Added

  • New prop boxShadow. It acts just like outline, but I called it boxShadow since that is the actual css attribute that is being controlled.
  • New props checkedIcon and uncheckedIcon. They have a checkmark and an x as default. Custom elements can be given as icons or the boolean value 'false', which will remove icons.

Refactor

  • Dependency on 'react-draggable' is removed and replaced with new drag logic.

Fixed

  • Glitch related to faulty 'inTransition' state fixed due to inTransition no longer existing.

Changed

  • Outline disappears when the users stops holding down the mouse. This is the same behaviour as google's switch-button implementation.
  • onChange callback function is now also triggered when enter key is pressed in violation of wai-aria checkbox spec. This is reasonably since it's in the toggle-button spec.

Removed

  • The deprecated 'name' and 'value' properties are removed.
yogaboll
published 1.2.0 •

Changelog

Source

[1.2.0 - 2017-09-29]

Fixed

  • Removed react and react-dom from dependencies.
  • Css-file replaced with inline styles to avoid webpack style-loader dependence.

Changed

  • Cursor style of handle changed to pointer instead of grabbing.
SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc