UNPKG

@n0n3br/react-use-scroll-direction

Version:

A robust React hook to detect vertical scroll direction ('up', 'down', 'static') for any DOM element or the window.

68 lines 1.96 kB
{ "name": "@n0n3br/react-use-scroll-direction", "version": "0.1.3", "description": "A robust React hook to detect vertical scroll direction ('up', 'down', 'static') for any DOM element or the window.", "main": "dist/index.cjs", "module": "dist/index.js", "types": "dist/index.d.ts", "type": "module", "exports": { ".": { "import": "./dist/index.js", "require": "./dist/index.cjs", "types": "./dist/index.d.ts" } }, "keywords": [ "react", "hook", "scroll", "direction", "usescrolldirection", "typescript" ], "author": "Rogerio Lacerda de Oliveira Alves <rogeriolaa@gmail.com> (https://github.com/rogeriolaa)", "license": "MIT", "repository": { "type": "git", "url": "git+https://github.com/rogeriolaa/react-use-scroll-direction.git" }, "bugs": { "url": "https://github.com/rogeriolaa/react-use-scroll-direction/issues" }, "homepage": "https://github.com/rogeriolaa/react-use-scroll-direction/tree/main/packages/use-scroll-direction#readme", "peerDependencies": { "react": ">=16.8.0" }, "devDependencies": { "@testing-library/jest-dom": "^6.6.3", "@testing-library/react": "^14.0.0", "@types/jest": "^29.5.0", "@types/node": "^22.15.21", "@types/react": "^18.2.0", "eslint": "^8.50.0", "jest": "^29.5.0", "jest-environment-jsdom": "^29.5.0", "react": "^18.2.0", "ts-jest": "^29.1.0", "ts-node": "^10.9.2", "tsup": "^7.2.0", "typescript": "^5.2.2", "tsconfig": "0.0.0", "eslint-config-custom": "0.1.0" }, "publishConfig": { "access": "public" }, "files": [ "dist" ], "scripts": { "build": "tsup src/index.ts --format cjs,esm --dts", "dev": "tsup src/index.ts --format cjs,esm --dts --watch", "test": "jest", "test:watch": "jest --watch", "lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0", "clean": "rm -rf dist" } }