Skip to content
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
149 lines (101 sloc) 7.71 KB






  • Fix for preventDefaultTouchmoveEvent in safari issue #127 and PR #131
    • Thank you @JiiB and @bhj!
    • use ref callback for both <Swipeable> and useSwipeable to attach all touch event handlers
      • useSwipeable's returned handlers now contains a ref callback
      • Please see disscusion and comments in both #127 and #131 for more details and info.
        • fix avoids the passive: true issue from chrome document event listeners
        • fix avoids bug on safari where the touchmove event listener needs to be attached before a touchstart in order to be able to call e.preventDefault
  • removed touchHandlerOption prop
    • fix above deprecates this prop


  • Introduce react hook, useSwipeable
  • Core rewrite to simplify api and trim down bundled size
  • Add size-limit to help keep bundled size down
  • Add es export via "module": "es/index.js" to package.json
  • Add prettier code formating
  • [BREAKING] simplify handler event data to allow destructuring
    • onSwiped = ({ event, direction, absX, absY, velocity}) => console.log('swiped')
  • [BREAKING] deprecated onSwiping{Left|Right|Up|Down} handler props
    • can be replaced with direction/dir event data
    • onSwiping = ({ dir }) => console.log(`swiping - ${dir}`)
  • [BREAKING] deprecated props
    • flickThreshold
    • stopPropagation
    • disabled
  • [BREAKING] deprecated passing "rest" of props down
    • removed additional props besides the ones used by <Swipeable> from being passed down
      • only className and style get passed to <Swipeable>'s dom node, default div


  • Add rotationAngle prop. #103
    • will allow to set a rotation angle, e.g. for a four-player game on a tablet, where each player has a 90° turned view.
    • Thank you @Narquadah and @LarsKumbier!


  • fixed bug that happened when if either onSwiping or onSwiped were set we were not calling e.preventDefault() appropriately


  • Add support for calling preventDefault on Chrome 56+ via passive event support checking and manual event listener setup. #88


  • add disabled prop. #83
  • add innerRef prop that allows user to access to <Swipeable>'s inner dom node react ref. #82


  • fixed bug where delta was causing a swipe to not be tracked correctly, #74 , thanks @mctep


  • Major Change preventDefaultTouchmoveEvent defaults to false now #69
  • Major Change drop support for React 12 & 13, peerDependencies updated #64
    • prop-types added to dependencies #64
  • Major Change trackMouse now 'tracks' the swipe outside of the swipeable component, #67.
  • react 16 added to peerDependencies


  • add onTap functionality. Thanks @anicke . #61 #39
  • added persisting synthetic event in example via e.persist(). This should help people see more details in the console when debugging in the example.


  • Allow onMouseDown, onMouseUp, and onMouseMove props to fire appropriately again. #55, thanks @lochstar
  • Stop using this.state to track swipes, thanks @grantila for pointing out this change and submitting PR, #58. Should provide minor performance gains since Swipeable will no longer be calling this.setState internally.



  • add stopPropagation prop for all swipe events, defaults to false. See #46 for more info.


  • fix React 15.2.0 warning for unknown properties on DOM elements


  • Add configurable container element via nodeName prop, defaults to 'div'. See #24 and #40 for more info.


  • Add preventDefault while swiping when props onSwipedLeft, onSwipedRight, onSwipedUp, and onSwipedDown are present. See #21 and #37 for more info.


  • Adds velocity data to onSwiping callback
  • Updated the build process introducing ES2015 and babel


  • Adds preventDefaultTouchMoveEvent option, defaults to true


  • Adds isFLick to onSwipe events
  • Removes React as a peer dep
  • Adds onSwiping events


  • Fixes onSwipeDown and onSwipeUp events


  • Fixes vertical swiping


  • Refactors build into jsx.


  • Adds onSwipedUp, onSwipedRight, onSwipedDown, onSwipedLeft callbacks.


  • onFlick prop has been removed.

  • onSwipe now has a 4th argument for the callback Boolean isFlick

  • Added a prop flickThreshold which allows you to customize at what velocity a flick is detected.

You can’t perform that action at this time.