All Versions
21
Latest Version
Avg Release Cycle
60 days
Latest Release
1530 days ago

Changelog History
Page 1

  • v6.0.0 Changes

    January 06, 2021

    โž• Added

    • โž• Add custom handle icons (@morinted)
    • โž• Add aria-checked attribute (@monicahung)
    • โž• Add borderRadius prop

    ๐Ÿ›  Fixed

    • Prevent setState from being called after component is unmounted (@smhg)

    ๐Ÿ”„ Changed

    • ๐Ÿšš When the checked state is not changed in the onChange callback, the switch will now go back to its previous position instead of getting stuck halfway. This means the switch will move back and forth if the onChange callback changes the state after an asynchronous operation.
    • ๐Ÿ‘Œ Support react and react-dom 17 as peer dependencies
    • โšก๏ธ Update all dev depencies
  • v5.0.1 Changes

    July 16, 2019

    ๐Ÿ›  Fixed

    • Minor typescript definition fix.
  • v5.0.0 Changes

    April 22, 2019

    โž• Added

    • It's now possible to give the Switch any prop (such as aria-* props or tabIndex) and it will automatically be passed to the nested input-element.
    • ๐Ÿ‘Œ Improved Typescript compatibility by using exports:named option in rollup. This could possibly be breaking for some obscure setups.

    ๐Ÿ”„ Changed

    • โšก๏ธ Replaced deprecated componentWillReceiveProps lifecycle hook with componentDidUpdate, which means it now works in strict mode.

    ๐Ÿ›  Fixed

    • Now works properly with right-to-left languages.
  • v4.1.0 Changes

    February 17, 2019

    โž• Added

    • โž• Add support for name attribute
  • v4.0.0 Changes

    January 30, 2019

    ๐Ÿ”„ Changed

    • The switch now includes a hidden nested checkbox input, which creates an expience more akin to a normal checkbox - clicking on the label will now cause a toggle, and the VoiceOver screen reader will now reliably read the label.
    • The switch will now always fire the onChange event if the dragStop event occurs <250ms after the dragStart event since that feels like a click.
    • Aria role changed from "checkbox" to "switch".
    • Pressing enter no longer activates the switch (spacebar still does)

    โž• Added

    • โž• Add new tabIndex prop

    ๐Ÿ›  Fixed

    • ๐Ÿ›  Fix glitch where the clicking the handle wouldn't trigger onChange event when browser window was out of focus on Windows.
  • v3.0.3 Changes

    June 15, 2018

    ๐Ÿ›  Fixed

    • Fix glitch where the switch would disintegrate if it had a parent with text-align set to center or right
  • v3.0.2 Changes

    June 07, 2018

    ๐Ÿ”„ Changed

    • โž• Add the correct gzip badge.
  • v3.0.1 Changes

    June 07, 2018

    ๐Ÿ”„ Changed

    • Some more byte shaving.
  • v3.0.0 Changes

    June 07, 2018

    ๐Ÿ”„ Changed

    • Shave off some extra bytes by setting interop: false in rollup config.

    ๐Ÿ›  Fixed

    • ๐Ÿ›  Fix peculiar glitch when used with preact-compat.
  • v3.0.0-beta.0 Changes

    June 06, 2018

    ๐Ÿ”„ Changed

    • Project structure was completely revamped to reduce bundle size:
    1. Use rollup to bundle the different source files.
    2. Use buble instead of babel for transpiling since it produces tinier output. ๐Ÿšš 3. Remove prop-types from production mode. Prop-types are still there in development mode so developer experience is unchanged.
    3. Mangle property names with uglify by putting a \$-sign at the start of the properties that are safe to mangle.

    ๐Ÿ›  Fixed