{"_id":"@1ohooks/use-scroll","_rev":"1-4bb3d1a8c4da06d77920e94791568735","name":"@1ohooks/use-scroll","dist-tags":{"latest":"0.1.1"},"versions":{"0.1.0":{"name":"@1ohooks/use-scroll","version":"0.1.0","main":"dist/packages/useScroll/src/index.js","types":"dist/packages/useScroll/src/index.d.ts","scripts":{"build":"tsc && copyfiles -u 1 src/**/*.{scss,png,jpg} dist/"},"keywords":[],"author":"","license":"ISC","_id":"@1ohooks/use-scroll@0.1.0","_nodeVersion":"18.14.2","_npmVersion":"9.5.1","dist":{"integrity":"sha512-P2V5Hix0t9b6dn9cANOI6dy3/g1heNeiebrH2BTSUTBQyjK/VJSa+FCVHoYDQITU6q06KiNt9GTK1TWjJ3HASg==","shasum":"22a4b9a5ac5268dd9ea2011fcac99f339a495ec6","tarball":"https://registry.npmjs.org/@1ohooks/use-scroll/-/use-scroll-0.1.0.tgz","fileCount":7,"unpackedSize":2858,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIF2r6T6YxEuCgaqyY3MK+p2xFI1XpxfshLNnoq7FlZfIAiEAhZE3LBIWCOAtD8BRirYXxqn3UoWOBXLq0sAkTjfTIpQ="}]},"_npmUser":{"name":"1ojames","email":"jameshuntdevelopment@gmail.com"},"directories":{},"maintainers":[{"name":"1ojames","email":"jameshuntdevelopment@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-scroll_0.1.0_1695583185219_0.18291354054210496"},"_hasShrinkwrap":false},"0.1.1":{"name":"@1ohooks/use-scroll","version":"0.1.1","main":"dist/packages/useScroll/src/index.js","types":"dist/packages/useScroll/src/index.d.ts","scripts":{"build":"tsc && copyfiles -u 1 src/**/*.{scss,png,jpg} dist/"},"keywords":[],"author":"","license":"ISC","description":"[![Version](https://img.shields.io/npm/v/@1ohooks/use-scroll.svg)](https://www.npmjs.org/package/@1ohooks/use-scroll) [![Coverage Status](https://coveralls.io/repos/github/1ohooks/use-scroll/badge.svg?branch=master)](https://coveralls.io/github/1ohooks/us","_id":"@1ohooks/use-scroll@0.1.1","_nodeVersion":"18.14.2","_npmVersion":"9.5.1","dist":{"integrity":"sha512-/vdr8muZeKJ74GIjwsG4o18IG4TEr7yQtQcfgxiEc87CzkGnP2FOtmo8dENHR2Y3ebOt2AduT8zT7EheLV8Z8Q==","shasum":"056426e11646958fcdcc3efd17ba27926754554b","tarball":"https://registry.npmjs.org/@1ohooks/use-scroll/-/use-scroll-0.1.1.tgz","fileCount":8,"unpackedSize":4915,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEeI7jtQ5HGF415ecrUt4TREOTACYkbphrhDl7Lx1vi5AiB+97YEoWCyZd6ktiPQqGWJXbOnebxuUq1Qwjvd4IvCxw=="}]},"_npmUser":{"name":"1ojames","email":"jameshuntdevelopment@gmail.com"},"directories":{},"maintainers":[{"name":"1ojames","email":"jameshuntdevelopment@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-scroll_0.1.1_1695593431600_0.1787372386292243"},"_hasShrinkwrap":false}},"time":{"created":"2023-09-24T19:19:45.114Z","0.1.0":"2023-09-24T19:19:45.392Z","modified":"2023-09-24T22:10:32.059Z","0.1.1":"2023-09-24T22:10:31.820Z"},"maintainers":[{"name":"1ojames","email":"jameshuntdevelopment@gmail.com"}],"keywords":[],"license":"ISC","readme":"# @1ohooks/use-scroll\n\n[![Version](https://img.shields.io/npm/v/@1ohooks/use-scroll.svg)](https://www.npmjs.org/package/@1ohooks/use-scroll)\n[![Coverage Status](https://coveralls.io/repos/github/1ohooks/use-scroll/badge.svg?branch=master)](https://coveralls.io/github/1ohooks/use-scroll?branch=master)\n[![Downloads](https://img.shields.io/npm/dm/@1ohooks/use-scroll.svg)](https://www.npmjs.com/package/@1ohooks/use-scroll)\n[![Try on RunKit](https://badge.runkitcdn.com/@1ohooks/use-scroll.svg)](https://runkit.com/npm/@1ohooks/use-scroll)\n\nThe `@1ohooks/use-scroll` package provides a custom React hook for tracking scroll direction and distance in your applications.\n\n## Installation\n\nYou can install `@1ohooks/use-scroll` using npm or yarn:\n\n```sh\nnpm install @1ohooks/use-scroll\n# or\nyarn add @1ohooks/use-scroll\n```\n\n## Documentation\n\n### useScroll\n\nThe `useScroll` hook allows you to track the scroll direction (up, down, or none) and the distance scrolled.\n\n```javascript\nimport { useScroll } from '@1ohooks/use-scroll';\n\n// Usage example\nfunction MyComponent() {\n  const { direction, distance } = useScroll();\n\n  if (direction === 'up') {\n    // The user is scrolling up\n  } else if (direction === 'down') {\n    // The user is scrolling down\n  } else {\n    // No scroll direction (initial state or no scrolling)\n  }\n\n  // `distance` contains the distance scrolled\n\n  return (\n    // Your component JSX\n  );\n}\n```\n\n#### Return Value\n\n- `direction` (string): The scroll direction, which can be `'up'`, `'down'`, or `'none'`.\n- `distance` (number): The distance scrolled in pixels.\n\n## Requirements\n\n- React 16 or higher.\n\n## Usage\n\nYou can use the `useScroll` hook to track the scroll direction and distance in your React components. This can be helpful for implementing scroll-based animations, lazy loading, or other dynamic behaviors.\n\nFor more advanced usage and customization options, refer to the hook documentation.\n\nThank you for using `@1ohooks/use-scroll` to enhance scroll tracking in your React applications. We hope you find it beneficial!","readmeFilename":"readme.md","description":"[![Version](https://img.shields.io/npm/v/@1ohooks/use-scroll.svg)](https://www.npmjs.org/package/@1ohooks/use-scroll) [![Coverage Status](https://coveralls.io/repos/github/1ohooks/use-scroll/badge.svg?branch=master)](https://coveralls.io/github/1ohooks/us"}