{"name":"react-remove-scroll-bar","version":"2.3.7","keywords":["scroll"],"author":{"name":"Anton Korzunov","email":"thekashey@gmail.com"},"license":"MIT","_id":"react-remove-scroll-bar@2.3.7","homepage":"https://github.com/theKashey/react-remove-scroll-bar#readme","bugs":{"url":"https://github.com/theKashey/react-remove-scroll-bar/issues"},"dist":{"shasum":"55ed3aa2cfcdfbeb9f0dfe6f6ed3af1be33c68af","tarball":"http://registry-npm.ywwl.com/react-remove-scroll-bar/download/react-remove-scroll-bar-2.3.7.tgz","fileCount":27,"integrity":"sha512-UzA0npskGFA2bUqwWsSRJscuQEt7zyfVtMpCtBl/lk+k/ky6lzYImEks9jwgxTDe/B0tb5hyrYgbQv/JQaHjDw==","signatures":[{"sig":"MEUCIQD9CvJ1ZWrd7cnlwikOa4qDAK5/r9O9Wgkost9atb3UggIgbTHZsyJAJ5lnpRVjQh59sX0uhwOPirgw6xEcRvY+Q9c=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24936,"size":4938,"noattachment":false,"key":"/react-remove-scroll-bar/-/react-remove-scroll-bar-2.3.7.tgz"},"main":"dist/es5/index.js","husky":{"hooks":{"pre-commit":"lint-staged"}},"types":"dist/es5/index.d.ts","module":"dist/es2015/index.js","engines":{"node":">=10"},"gitHead":"29e9fcd1eecf7d3b77a767941c4a57fe461fc1e4","scripts":{"dev":"lib-builder dev","lint":"lib-builder lint","size":"yarn size-limit","test":"jest","build":"lib-builder build && yarn size:report","format":"lib-builder format","update":"lib-builder update","release":"yarn build && yarn test","test:ci":"jest --runInBand --coverage","changelog":"conventional-changelog -p angular -i CHANGELOG.md -s","storybook":"start-storybook -p 6006","prepublish":"yarn build && yarn changelog","size:report":"yarn --silent size-limit --json > .size.json","changelog:rewrite":"conventional-changelog -p angular -i CHANGELOG.md -s -r 0"},"_npmUser":{"name":"kashey","email":"thekashey@gmail.com"},"prettier":{"semi":true,"tabWidth":2,"printWidth":120,"singleQuote":true,"trailingComma":"es5"},"repository":{"url":"git+https://github.com/theKashey/react-remove-scroll-bar.git","type":"git"},"_npmVersion":"10.5.0","description":"Removes body scroll without content _shake_","directories":{},"jsnext:main":"dist/es2015/index.js","lint-staged":{"*.{ts,tsx}":["prettier --write","eslint --fix","git add"],"*.{js,css,json,md}":["prettier --write","git add"]},"_nodeVersion":"18.20.1","dependencies":{"tslib":"^2.0.0","react-style-singleton":"^2.2.1"},"module:es2019":"dist/es2019/index.js","_hasShrinkwrap":false,"devDependencies":{"react":"^16.8.6","react-dom":"^16.8.6","size-limit":"^11.0.2","@types/react":"^16.14.56","@storybook/react":"^6.4.22","@testing-library/react":"^12.1.5","@theuiteam/lib-builder":"^0.1.4","@size-limit/preset-small-lib":"^11.0.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0","@types/react":"*"},"peerDependenciesMeta":{"@types/react":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/react-remove-scroll-bar_2.3.7_1734225325139_0.5959877518852188","host":"s3://npm-registry-packages-npm-production"},"readme":"<h1>react-remove-scroll-bar</h1>\n\n[![npm](https://img.shields.io/npm/v/react-remove-scroll-bar.svg)](https://www.npmjs.com/package/react-remove-scroll-bar)\n[![bundle size](https://badgen.net/bundlephobia/minzip/react-remove-scroll-bar)](https://bundlephobia.com/result?p=react-remove-scroll-bar)\n[![downloads](https://badgen.net/npm/dm/react-remove-scroll-bar)](https://www.npmtrends.com/react-remove-scroll-bar)\n\n<hr />\n\n> v1+ for React 15, v2+ requires React 16.8+\n\nRemoves scroll bar (by setting `overflow: hidden` on body), and preserves the scroll bar \"gap\".\n\nRead - it just makes scroll bar invisible.\n\nDoes nothing if scroll bar does not consume any space.\n\n# Usage\n\n```js\nimport {RemoveScrollBar} from 'react-remove-scroll-bar';\n\n<RemoveScrollBar /> -> no scroll bar\n```\n\n### The Right Border\nTo prevent content jumps __position:fixed__ elements with `right:0`  should have additional classname applied.\nIt will just provide a _non-zero_ right, when it needed, to maintain the right \"gap\".\n```js\nimport {zeroRightClassName,fullWidthClassName, noScrollbarsClassName} from 'react-remove-scroll-bar';\n\n// to set `right:0` on an element\n<div className={zeroRightClassName} />\n\n// to set `width:100%` on an element\n<div className={fullWidthClassName} />\n\n// to remove scrollbar from an element\n<div className={noScrollbarsClassName} />\n\n```\n\n# Size\n500b after compression (excluding tslib).\n\n# Scroll-Locky\nAll code is a result of a [react-scroll-locky](https://github.com/theKashey/react-scroll-locky) refactoring.\n\n# Article\nThere is a medium article about preventing the body scroll - [How to fight the <body> scroll](https://medium.com/@antonkorzunov/how-to-fight-the-body-scroll-2b00267b37ac)\n\n# License\nMIT\n","publish_time":1734225325311,"maintainers":[{"name":"kashey","email":"thekashey@gmail.com"}],"_cnpm_publish_time":1734225325311,"dist-tags":{"latest":"2.3.8"}}