{"_id":"@adalo/react-indiana-drag-scroll","_rev":"28-e2b0bade891e7f7c1c5364c2eb0a1ae9","name":"@adalo/react-indiana-drag-scroll","dist-tags":{"latest":"1.7.1"},"versions":{"1.7.0":{"name":"@adalo/react-indiana-drag-scroll","version":"1.7.0","keywords":["react","drag","scroll","library","lightweight","scrolling","dragandscroll"],"author":{"name":"Adalo"},"license":"MIT","_id":"@adalo/react-indiana-drag-scroll@1.7.0","maintainers":[{"name":"zachbharris","email":"zachbharris94@gmail.com"},{"name":"protonapp","email":"jeremy@adalo.com"}],"homepage":"https://github.com/norserium/react-indiana-drag-scroll#readme","bugs":{"url":"https://github.com/norserium/react-indiana-drag-scroll/issues"},"dist":{"shasum":"dfb70874581ca81aef0eca54e4042a9d6bf1a0fc","tarball":"https://registry.npmjs.org/@adalo/react-indiana-drag-scroll/-/react-indiana-drag-scroll-1.7.0.tgz","fileCount":8,"integrity":"sha512-mAXq6OfK+YW4qS1MFXp+DPqD321PvyN1SLUYuDesKdU/FAWtyWjb/FpPLfWrSDveqw/tPOhBfCAM3KD147T6AA==","signatures":[{"sig":"MEUCIQCEc6+w6+R90GNgeRli2nmKqZvmWokJt2KQUiVk45foZQIgbggGWeznpcU5CHyBW6+ITfrXAjwDNsxWSdoTKV+2qYI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":98399,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh1v1iCRA9TVsSAnZWagAAVFEP/0btlE5BXb7KtmIf9r7w\nriktx2d67g+g8NmlZTdesEaOkVhTA+R8wwiHFg4LKoF4Cp345fbup24Nre9u\nx9cN0iQsTb01TK80ll9y2wjcvCHycl/s2uClXkwTr+zh4AOlVVLGpANWjYZq\nRstACCKVRyL44qhQdvwGguF5ZLlHT1bYxrZ5BhwVO5wtgzT4FqUJzlaPmIMw\nucyc8HJtmkH25yO2o5QLbnBBIek8mcDrvYI5iClnd8YTPc7frRiDd7lBH5hS\nP+hDzGILx8yAXGvgOJVNDA0cIgNHPrbIpoYk6eLlknRLkSh7rZiE5u9y2AZX\niiPO4/y0t5RDNxR2BhPXfaC1sgfRyUDZlICdAK5f3uZI3YEX1vHTogeOGNAL\nB/zZej17PYgCZ2++/M89xXX7G+ksuGjUCMRMZfQ+86oQ4QAO0VM6DFn6iNTM\n7ULswLnITn7UPmXb1x2oDyJ4bBfAN2w8T0LDTMcpO73rjVU3wlRP03d1dFgf\nFgb7tOwDkz1d7EEi2Afh6RL+IWZBcUTU4AYaocAG8sr+JNYkDvK6yczGJthR\nDpiO1GvO4cZjDPaEO8H4CVbcliAY65v104HuDfnJCerEJJdWeKkiFQ9WSb2x\nRuy1XGEahPGfXBclo/AE9XA2/oFjCrr9XmrdD9V7USyj1XuHnc3EcVqeQxPA\nMFkN\r\n=xAlC\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"types/index.d.ts","module":"dist/index.es.js","engines":{"npm":">=5","node":">=8"},"gitHead":"f13b8e65505b200769898150f012b4624e3405c6","scripts":{"test":"cross-env CI=1 react-scripts test --env=jsdom","build":"rollup -c","start":"rollup -c -w","deploy":"gh-pages -d example/build","prepare":"npm run build","predeploy":"cd example && npm install && npm run build","test:watch":"react-scripts test --env=jsdom"},"_npmUser":{"name":"protonapp","email":"jeremy@adalo.com"},"repository":{"url":"git+https://github.com/norserium/react-indiana-drag-scroll.git","type":"git"},"_npmVersion":"6.14.4","description":"Implements scroll on drag","directories":{},"jsnext:main":"dist/index.es.js","_nodeVersion":"13.14.0","dependencies":{"debounce":"^1.2.0","easy-bem":"^1.0.0","node-sass":"^4.14.1","classnames":"^2.2.6"},"_hasShrinkwrap":false,"devDependencies":{"react":"^16.4.1","rollup":"^0.64.1","gh-pages":"^1.2.0","cross-env":"^5.1.4","react-dom":"^16.4.1","babel-core":"^6.26.3","@types/react":"^16.9.19","autoprefixer":"^9.6.1","babel-eslint":"^9.0.0","react-scripts":"^2.1.8","postcss-nested":"^4.1.2","babel-preset-env":"^1.7.0","rollup-plugin-url":"^1.4.0","babel-preset-react":"^6.24.1","eslint-plugin-node":"^7.0.1","eslint-plugin-react":"^7.10.0","rollup-plugin-babel":"^3.0.7","babel-preset-stage-0":"^6.24.1","eslint-plugin-import":"^2.13.0","eslint-plugin-promise":"^4.0.0","rollup-plugin-postcss":"^1.6.2","eslint-config-standard":"^11.0.0","eslint-plugin-standard":"^3.1.0","rollup-plugin-commonjs":"^9.1.3","rollup-plugin-node-resolve":"^3.3.0","eslint-config-standard-react":"^6.0.0","babel-plugin-external-helpers":"^6.22.0","rollup-plugin-peer-deps-external":"^2.2.0"},"peerDependencies":{"react":"^15.0.0 || ^16.0.0","react-dom":"^15.0.0 || ^16.0.0","prop-types":"^15.5.4"},"_npmOperationalInternal":{"tmp":"tmp/react-indiana-drag-scroll_1.7.0_1597683541000_0.7491246419728652","host":"s3://npm-registry-packages"}},"1.7.1":{"name":"@adalo/react-indiana-drag-scroll","version":"1.7.1","keywords":["react","drag","scroll","library","lightweight","scrolling","dragandscroll"],"author":{"name":"Adalo"},"license":"MIT","_id":"@adalo/react-indiana-drag-scroll@1.7.1","maintainers":[{"name":"protonapp","email":"guislain@adalo.com"}],"homepage":"https://github.com/norserium/react-indiana-drag-scroll#readme","bugs":{"url":"https://github.com/norserium/react-indiana-drag-scroll/issues"},"dist":{"shasum":"5a04787733801c04d8bcbfa98cef300af520103a","tarball":"https://registry.npmjs.org/@adalo/react-indiana-drag-scroll/-/react-indiana-drag-scroll-1.7.1.tgz","fileCount":8,"integrity":"sha512-IPggtBzG6WUO03BDLOC0S16f9qmON0t58hcGbWz1g88C2sKc7tK/sw2H3tYNY2ll6KHPqpu5nDeUktC5dQequQ==","signatures":[{"sig":"MEUCIDo6APx/hOXPQHPTqeQkkFfEF5QXamL9+uu2QIsOwBSnAiEA5Usa7zjTdP0XZplf+DOBp5FHAdZD2/BuzndU/IYRJwM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":99509},"main":"dist/index.js","types":"types/index.d.ts","module":"dist/index.es.js","engines":{"npm":">=6","node":">=14"},"gitHead":"749701a4dc69008c09df9516a313c617a8d77401","scripts":{"test":"cross-env CI=1 react-scripts test --env=jsdom","build":"rollup -c","start":"rollup -c -w","deploy":"gh-pages -d example/build","prepare":"npm run build","predeploy":"cd example && npm install && npm run build","test:watch":"react-scripts test --env=jsdom"},"_npmUser":{"name":"protonapp","email":"guislain@adalo.com"},"repository":{"url":"git+https://github.com/norserium/react-indiana-drag-scroll.git","type":"git"},"_npmVersion":"6.14.18","description":"Implements scroll on drag","directories":{},"jsnext:main":"dist/index.es.js","_nodeVersion":"14.21.3","dependencies":{"debounce":"^1.2.0","easy-bem":"^1.0.0","classnames":"^2.2.6"},"_hasShrinkwrap":false,"devDependencies":{"react":"^16.4.1","rollup":"^0.64.1","gh-pages":"^1.2.0","cross-env":"^5.1.4","react-dom":"^16.4.1","babel-core":"^6.26.3","@types/react":"^16.9.19","autoprefixer":"^9.6.1","babel-eslint":"^9.0.0","react-scripts":"4.0.3","postcss-nested":"^4.1.2","babel-preset-env":"^1.7.0","rollup-plugin-url":"^1.4.0","babel-preset-react":"^6.24.1","eslint-plugin-node":"^7.0.1","eslint-plugin-react":"^7.10.0","rollup-plugin-babel":"^3.0.7","babel-preset-stage-0":"^6.24.1","eslint-plugin-import":"^2.13.0","eslint-plugin-promise":"^4.0.0","rollup-plugin-postcss":"^1.6.2","eslint-config-standard":"^11.0.0","eslint-plugin-standard":"^3.1.0","rollup-plugin-commonjs":"^9.1.3","rollup-plugin-node-resolve":"^3.3.0","eslint-config-standard-react":"^6.0.0","babel-plugin-external-helpers":"^6.22.0","rollup-plugin-peer-deps-external":"^2.2.0"},"peerDependencies":{"react":"^15.0.0 || ^16.0.0","react-dom":"^15.0.0 || ^16.0.0","prop-types":"^15.5.4"},"_npmOperationalInternal":{"tmp":"tmp/react-indiana-drag-scroll_1.7.1_1695650437438_0.7309337148136257","host":"s3://npm-registry-packages"}}},"time":{"created":"2020-08-17T16:59:00.999Z","modified":"2025-11-21T07:47:21.704Z","1.7.0":"2020-08-17T16:59:07.839Z","1.7.1":"2023-09-25T14:00:37.631Z"},"bugs":{"url":"https://github.com/norserium/react-indiana-drag-scroll/issues"},"author":{"name":"Adalo"},"license":"MIT","homepage":"https://github.com/norserium/react-indiana-drag-scroll#readme","keywords":["react","drag","scroll","library","lightweight","scrolling","dragandscroll"],"repository":{"url":"git+https://github.com/norserium/react-indiana-drag-scroll.git","type":"git"},"description":"Implements scroll on drag","maintainers":[{"email":"guislain@adalo.com","name":"guislain-adalo"},{"email":"adalodev@adalo.com","name":"adalodev"},{"email":"jason.gilmore@adalo.com","name":"adalo-jasongilmore"},{"email":"daniel.costa@adalo.com","name":"danielcostadev"},{"email":"oleksandr.vakulinskyi@adalo.com","name":"oleksandrvakulinskyi"},{"email":"alicia.debroux@adalo.com","name":"adebroux"},{"email":"michael.aldridge@adalo.com","name":"michael-adalo"},{"email":"enzo.monjardin@adalo.com","name":"enzo-adalo"},{"email":"oleksandr.kalashnyk@adalo.com","name":"oleksandrkalashnyk"},{"email":"pawel.neubauer@adalo.com","name":"pneubaueradalo"}],"readme":"# React Indiana Drag Scroll\n\n> Implements scroll on drag\n\n[Examples](https://norserium.github.io/react-indiana-drag-scroll/) / [Sandbox](https://codesandbox.io/s/react-indiana-drag-scroll-default-iw9xh)\n\n[![NPM](https://img.shields.io/npm/v/react-indiana-drag-scroll.svg)](https://www.npmjs.com/package/react-indiana-drag-scroll) [![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)\n\n## Welcome to journey!\n\n![](https://github.com/norserium/react-indiana-drag-scroll/blob/master/example/demo.gif?raw=true)\n\nTry it yourself! Go to [demo website](https://norserium.github.io/react-indiana-drag-scroll/).\n\n## Install\n\n```bash\nnpm install --save react-indiana-drag-scroll\n```\n\n```bash\nyarn add react-indiana-drag-scroll\n```\n\n## Usage\n\n```jsx\nimport React, { Component } from 'react'\n\nimport ScrollContainer from 'react-indiana-drag-scroll'\n\nclass Example extends Component {\n  render () {\n    return (\n      <ScrollContainer className=\"scroll-container\">\n        { ... }\n      </ScrollContainer>\n    )\n  }\n}\n```\n\n## Component properties\n\n| Prop               | Type     | Description                                                                               | Default |\n| ------------------ | -------- | ----------------------------------------------------------------------------------------- | ------- |\n| vertical           | Bool     | Allow vertical drag scrolling                                                             | true    |\n| horizontal         | Bool     | Allow horizontal drag scrolling                                                           | true    |\n| hideScrollbars     | Bool     | Hide the scrollbars                                                                       | true    |\n| activationDistance | Number   | The distance that distinguish click and drag start                                        | 10      |\n| children           | Node     | The content of scrolling container                                                        |\n| onScroll           | Function | Invoked when user scrolling container                                                     |\n| onEndScroll        | Function | Invoked when user ends scrolling container                                                |\n| onStartScroll      | Function | Invoked when user starts scrolling container                                              |\n| onClick            | Function | Invoked when user clicks the scrolling container without dragging                         |\n| className          | String   | The custom classname for container                                                        |\n| style              | Number   | The custom styles for container                                                           |\n| ignoreElements     | String   | Selector for elements that should not trigger the scrolling behaviour (for example, `\".modal, dialog\"` or `\"*[prevent-drag-scroll]\"`) |\n| nativeMobileScroll | Bool     | Use native mobile drag scroll for mobile devices                                          | true\n\n## Static functions\n\n| Name               | Returns     | Description                                                                            |\n| ------------------ | ----------- | -------------------------------------------------------------------------------------- |\n| getElement         | HTMLElement | Returns the HTML element                                                               |\n\n\n## FAQ\n\n### How to set the initial scroll?\n\nTo set initial scroll you need get the ref to the main DOM element of the `ScrollContainer`. It can be implement by [using `ReactDOM.findDOMNode`](https://codesandbox.io/s/react-indiana-drag-scroll-initial-scroll-finddomnode-dvdop) or by [using the static function `getElement`](https://codesandbox.io/s/react-indiana-drag-scroll-initial-scroll-getelement-99o6q) (this approach is available in the strict mode by the way).\n\n## License\n\nThe source code is licensed under MIT, all images (except [hieroglyphs](https://www.freepik.com/free-vector/ancient-egypt-hieroglyphics-background-with-flat-design_2754100.htm)) are copyrighted to their respective owner © [Norserium](https://github.com/norserium)\n","readmeFilename":"README.md"}