{"_id":"use-draggable-scroll","_rev":"1-7c2fef766866aed3617cfb4fdb89a633","name":"use-draggable-scroll","dist-tags":{"latest":"0.1.0"},"versions":{"0.1.0":{"version":"0.1.0","license":"MIT","main":"dist/index.js","typings":"dist/index.d.ts","engines":{"node":">=10"},"scripts":{"start":"tsdx watch","build":"tsdx build","lint":"tsdx lint","prepare":"tsdx build","size":"size-limit","analyze":"size-limit --why"},"peerDependencies":{"react":">=16"},"husky":{"hooks":{"pre-commit":"tsdx lint"}},"prettier":{"printWidth":80,"semi":true,"singleQuote":true,"trailingComma":"es5"},"name":"use-draggable-scroll","author":{"name":"Guillermo del Molino"},"module":"dist/use-draggable-scroll.esm.js","size-limit":[{"path":"dist/use-draggable-scroll.cjs.production.min.js","limit":"10 KB"},{"path":"dist/use-draggable-scroll.esm.js","limit":"10 KB"}],"devDependencies":{"@size-limit/preset-small-lib":"^4.12.0","@types/react":"^17.0.11","@types/react-dom":"^17.0.8","husky":"^6.0.0","react":"^17.0.2","react-dom":"^17.0.2","size-limit":"^4.12.0","tsdx":"^0.14.1","tslib":"^2.3.0","typescript":"^4.3.4"},"description":"React hook to add draggability to scrollable content easily","repository":{"type":"git","url":"git+https://github.com/g-delmo/use-draggable-scroll.git"},"keywords":["draggable","drag","scroll","react","draggability"],"gitHead":"59769ab99a2a7b0be627c7bee5f07341e6c9cebe","bugs":{"url":"https://github.com/g-delmo/use-draggable-scroll/issues"},"homepage":"https://github.com/g-delmo/use-draggable-scroll#readme","_id":"use-draggable-scroll@0.1.0","_nodeVersion":"12.18.2","_npmVersion":"7.6.3","dist":{"integrity":"sha512-mX6nT3cUqOTtA+8QUH9HfdKtzI6Oquj9QIB0wALWZYmWogNQ746MaUcmqKOKCIlt2UH6egxhSKNPiSlfEqmKhA==","shasum":"ca7967eeec9d6a53f965b84f9c295c214aa43ed7","tarball":"https://registry.npmjs.org/use-draggable-scroll/-/use-draggable-scroll-0.1.0.tgz","fileCount":12,"unpackedSize":24581,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgzULICRA9TVsSAnZWagAAvpwP/iGyc7ExnFpvSUPjxeaN\noLL8QGKSxL6XGkgF2lPtXpFpA+LYiK6c2JCAXRngFcTuKkMC1CIUNNpBIBN8\n5c1p9GD/j5zhJH7rUHF6fgovirvw/HpahdZHATURS6n240HaU4IrJRoVBs/q\nvypMJbuXDvMnnPzNTfA+SYMQ8W4SeZ6Ph9ALSlGWS9WeSgVqzOX4UsAKplm4\nsklplxJI4F+RkiM1Z/+l4Cak2LBMHjFG4eOjv1iaFBm7w0H8egVLb1V8esyF\nFAhd7XQ+1AIc1buh+5AVp4TgXls9BwpjbNf5TEXAYRwKfyWfq9mgG+83xO+o\nhHmHqA1fvnK3HvW1T+RXjq00B6iQXEaYDNa/uga28WZmNQg+XYfg4zH4E32a\nFxVVy+SKBnGFIsJYbW4f/Ow/UJrf8vyC0+EfV+m0Q4Gh/scb3x6Cx9p4vsa7\njIixM4RTInwX/jYJmLdt8xx+BYJHayj54BIQDbz2bGeH2XnZfUGsA9BKcdpO\nbO3LfYH4AuYAmTjYTljWX5vsmwCjwZYCMU/yJJ0zvq2POHM7PWsO9Yi5gwmp\ndp5z8KWwqYTkylfjaJlqucwsZrpXaN3qOql0SKLjw9wPGY2rfizoGq/Xqiuw\n8hfyeI3THCGlvp2L3acCHA4MQweXzYKWSWxlf7Xgnczz2GSdQ4nrOFjHX75N\n2yNF\r\n=Odc7\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFpioBfku2+WjJr4irMnRJZuUFdu0DSs/CE/qgvqCNp9AiEA+NlexIxs8vnRHEQt+U98jR615F/JfQE6xsUUv52yRiY="}]},"_npmUser":{"name":"g-delmo","email":"guillermo.delmolino@gmail.com"},"directories":{},"maintainers":[{"name":"g-delmo","email":"guillermo.delmolino@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-draggable-scroll_0.1.0_1624064712076_0.21854738099483084"},"_hasShrinkwrap":false}},"time":{"created":"2021-06-19T01:05:12.076Z","0.1.0":"2021-06-19T01:05:12.184Z","modified":"2022-05-22T22:03:37.590Z"},"maintainers":[{"name":"g-delmo","email":"guillermo.delmolino@gmail.com"}],"description":"React hook to add draggability to scrollable content easily","homepage":"https://github.com/g-delmo/use-draggable-scroll#readme","keywords":["draggable","drag","scroll","react","draggability"],"repository":{"type":"git","url":"git+https://github.com/g-delmo/use-draggable-scroll.git"},"author":{"name":"Guillermo del Molino"},"bugs":{"url":"https://github.com/g-delmo/use-draggable-scroll/issues"},"license":"MIT","readme":"# use-draggable-scroll\n\nReact hook to add draggability to scrollable content easily.\n\n![](./demo.gif)\n\n### Usage\n\n```tsx\nimport { useDraggableScroll } from 'use-draggable-scroll';\n\nconst Component = () => {\n  const ref = useRef(null);\n\n  const { onMouseDown } = useDraggableScroll(ref);\n\n  return (\n    <div ref={ref} onMouseDown={onMouseDown}>\n      <div>child 1</div>\n      <div>child 2</div>\n      <div>child 3</div>\n    </div>\n  );\n};\n```\n\n### Optional parameters\n\nYou can specify the drag direction that is allowed (`vertical`, `horizontal` or `both`(default))\n\n```tsx\nconst { onMouseDown } = useDraggableScroll(ref, { direction: 'vertical' });\n```\n","readmeFilename":"README.md"}