{"bugs":{"url":"https://github.com/react-spring/react-use-gesture/issues"},"dist":{"shasum":"9d4f8dbb48ec5f9d83b5802de0bedb0900c549de","tarball":"https://registry.npmjs.org/react-use-gesture/-/react-use-gesture-8.0.0-beta.2.tgz","fileCount":41,"integrity":"sha512-TM5rt1hOSj1nlYjHL3VC9Zzk1N1e7P5iYJznXE4KNuD6ldsA3OLJU4fg9qC+ZrePmAf90z5SdTeCBpp6Nysg1w==","signatures":[{"sig":"MEYCIQCbQr5b1KKXuwseBYj9RkZgJ1nChUuIQsRm51U7UbyzcAIhAMM+PM3oxFmmaqq2pySgGvMwkuVG0ckaBEoINJ0liqub","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":604159,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfjx6QCRA9TVsSAnZWagAA6tAP+QDaqtWqueFb1Uq9epgy\nMmnqTbICTbQZiPjXtuyeyDbpvXJSWi/jqljfeFck1R8XZfVFv/2HdzVlpzUg\ncqOjmCUggn4nUqTZZg5EoaMwo0I4HfrBx/VOh+g+iL8dgCQXlLQwIa7FUXzW\nlx1xkDlq0LQMsDkUGPDIyeDy+jdw8EbbKJG2IX293f1RgP7BXDZLzOCahpS/\nSfsT3jZOmz1XXDdiUDwKTUwIgKVZ2MMNZXxP3IEF48ZYPTV2V7vmsRycreZi\nDZlrdifmpI8h42An+zLmyl89ZF1M3sprGTfbXVxNDJ0/mS5mO6LHxFAnvCPY\n1BEmROEsqBaotDz6jI3S/sXAggT7vLiA4Wl8b4JF5XDY3wzfRPe7ZuSRGwwe\no1nbUDt4Eq/Blb1o1zkPf9n37YIKSxu+PCg9lgf8Ac5LfhqOAUvuo9RLYhq1\nd68rjCrFgv7YqOo8kwW/vN0oXYPODagXJW1tMgzCAWbjsPASOUhuGQs/W540\nL1XBaN0HeLmKMN/5SfMkJtdr3ib2yhK+LJKsnIUQefrtLsNL8NIlOSuWlA6B\nCGUq7uJWEvn28nANXVqKoyM7WsQ9W4ZV/K/1wNDXOk/+26W0ZWzYIcMma6U2\nhUT+NvC1bqya6hIxAPvm9RAxEOqE022NA3sAJg2W2xbPe7HyxsX7DmYFILa+\n0fXh\r\n=U7Oi\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"roots":["./src","./test"],"setupFiles":["@testing-library/react/dont-cleanup-after-each"],"testEnvironment":"jsdom","setupFilesAfterEnv":["./setupPointerEvent.js"]},"main":"dist/index.js","name":"react-use-gesture","author":{"name":"Paul Henschel"},"module":"dist/react-use-gesture.esm.js","readme":"# React UseGesture\n\n![npm (tag)](https://img.shields.io/npm/v/react-use-gesture) ![npm bundle size](https://img.shields.io/bundlephobia/minzip/react-use-gesture) ![NPM](https://img.shields.io/npm/l/react-use-gesture) ![Travis (.org) branch](https://img.shields.io/travis/react-spring/react-use-gesture/master) [![Discord Shield](https://discordapp.com/api/guilds/740090768164651008/widget.png?style=shield)](https://discord.gg/ZZjjNvJ)\n\nReact UseGesture is a hook that lets you bind richer mouse and touch events to any component or view. With the data you receive, it becomes trivial to set up gestures, and often takes no more than a few lines of code.\n\nYou can use it stand-alone, but to make the most of it you should combine it with an animation library like [react-spring](https://github.com/react-spring/react-spring), though you can most certainly use any other.\n\n<p align=\"middle\">\n  <a href=\"https://codesandbox.io/s/draggable-list-fh8r8\"><img src=\"https://i.imgur.com/qLKJod3.gif\" width=\"400\"/></a>\n  <a href=\"https://codesandbox.io/s/cards-fduch\"><img src=\"https://i.imgur.com/H6nXQEq.gif\" width=\"400\"/></a>\n  <a href=\"https://codesandbox.io/s/action-sheet-zuwji\"><img src=\"https://i.imgur.com/THKPrmR.gif\" width=\"400\"/></a>\n  <a href=\"https://codesandbox.io/s/infinite-slideshow-nigoy\"><img src=\"https://i.imgur.com/cuOfqST.gif\" width=\"400\"/></a>\n  <a href=\"https://codesandbox.io/s/viewpager-v364z\"><img src=\"https://i.imgur.com/iwZOfT9.gif\" width=\"400\"/></a>\n  <a href=\"https://codesandbox.io/s/rkgzi\"><img src=\"https://i.imgur.com/Walt1Ip.gif\" width=\"400\"/></a>\n</p>\n\n<p align=\"middle\"><i>The demos are real click them!</i></p>\n\n### Installation\n\n```bash\n#Yarn\nyarn add react-use-gesture\n\n#NPM\nnpm install react-use-gesture\n```\n\n### [Full documentation website](https://use-gesture.netlify.com)\n\n- [Available Hooks](https://use-gesture.netlify.com/docs/hooks)\n- [Gesture State](https://use-gesture.netlify.com/docs/state)\n- [Gesture Options](https://use-gesture.netlify.com/docs/options)\n- [Utilities](https://use-gesture.netlify.com/docs/utilities)\n- [FAQ](https://use-gesture.netlify.com/docs/faq)\n\n### Simple example\n\n<p align=\"middle\">\n  <a href=\"https://codesandbox.io/s/react-use-gesture-simple-i5e0j\"><img src=\"https://i.imgur.com/AMzsEi3.gif\" width=\"400\"/></a>\n</p>\n\n```jsx\nimport { useSpring, animated } from 'react-spring'\nimport { useDrag } from 'react-use-gesture'\n\nfunction PullRelease() {\n  const [{ x, y }, set] = useSpring(() => ({ x: 0, y: 0 }))\n\n  // Set the drag hook and define component movement based on gesture data\n  const bind = useDrag(({ down, movement: [mx, my] }) => {\n    set({ x: down ? mx : 0, y: down ? my : 0 })\n  })\n\n  // Bind it to a component\n  return <animated.div {...bind()} style={{ x, y, touchAction: 'none' }} />\n```\n\nThe example above makes a `div` draggable so that it follows your mouse on drag, and returns to its initial position on release.\n\n**Make sure you always set [`touchAction`](https://developer.mozilla.org/en-US/docs/Web/CSS/touch-action) on a draggable element to prevent glitches with the browser native scrolling on touch devices**.\n\n### Available hooks\n\nReact-use-gesture exports several hooks that can handle different gestures:\n\n| Hook         | Description                                |\n| ------------ | ------------------------------------------ |\n| `useDrag`    | Handles the drag gesture                   |\n| `useMove`    | Handles mouse move events                  |\n| `useHover`   | Handles mouse enter and mouse leave events |\n| `useScroll`  | Handles scroll events                      |\n| `useWheel`   | Handles wheel events                       |\n| `usePinch`   | Handles the pinch gesture                  |\n| `useGesture` | Handles multiple gestures in one hook      |\n\n#### [More on the full documentation website...](https://use-gesture.netlify.com)\n","gitHead":"81313ee3410cf1198e6e1c6a81fb20197b1e25c5","license":"MIT","scripts":{"lint":"tsdx lint","test":"tsdx test","build":"tsdx build","start":"tsdx watch","prepare":"yarn build","build-docs":"cd ./docusaurus && yarn build","test:watch":"tsdx test --watchAll"},"typings":"dist/index.d.ts","_npmUser":{"name":"dbismut","email":"david.bismut@gmail.com"},"homepage":"https://use-gesture.netlify.app","keywords":["react","hook","gesture","mouse","trackpad","touch","drag","pinch","rotate","scale","zoom","scroll","wheel"],"prettier":{"semi":false,"printWidth":120,"arrowParens":"avoid","singleQuote":true,"trailingComma":"es5"},"deprecated":"This package is no longer maintained. Please use @use-gesture/react instead","repository":{"url":"git+https://github.com/react-spring/react-use-gesture.git","type":"git"},"_npmVersion":"6.14.6","description":"React hook for receiving gestures https://use-gesture.netlify.app","directories":{},"maintainers":[{"name":"drcmda","email":"drcmda@gmail.com"},{"name":"dbismut","email":"david.bismut@gmail.com"}],"sideEffects":false,"_nodeVersion":"12.18.4","contributors":[{"url":"https://github.com/dbismut","name":"David Bismut"}],"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"tsdx":"^0.14.1","husky":"^4.3.0","react":"^16.14.0","tslib":"^2.0.3","prettier":"^2.1.2","react-dom":"^16.14.0","size-limit":"^4.6.0","typescript":"^4.0.3","@types/jest":"^26.0.14","@types/react":"^16.9.53","pretty-quick":"^3.1.0","@types/react-dom":"^16.9.8","@testing-library/react":"^11.1.0","eslint-plugin-prettier":"^3.1.4","@testing-library/jest-dom":"^5.9.0","@size-limit/preset-small-lib":"^4.6.0"},"peerDependencies":{"react":">= 16.8.0"},"_npmOperationalInternal":{"tmp":"tmp/react-use-gesture_8.0.0-beta.2_1603214992193_0.8801612048661487","host":"s3://npm-registry-packages"},"_id":"react-use-gesture@8.0.0-beta.2","version":"8.0.0-beta.2"}