{"name":"simplebar-react","version":"2.0.4-corejs2","author":{"name":"Adrien Denat"},"license":"MIT","_id":"simplebar-react@2.0.4-corejs2","maintainers":[{"name":"grsmto","email":"oi@adriendenat.com"}],"homepage":"https://grsmto.github.io/simplebar/","bugs":{"url":"https://github.com/grsmto/simplebar/issues"},"dist":{"shasum":"65607805ceb84ca79a49bbca736be550de881549","tarball":"http://registry-npm.ywwl.com/simplebar-react/download/simplebar-react-2.0.4-corejs2.tgz","fileCount":6,"integrity":"sha512-epxDWOgmUZqCiyETSY6quvU7+F3LU4SvZxmfDl9I6kkclJnQXQVWeUhhYdMcELykr2wMtGATUWMKxYnYuJvQQA==","signatures":[{"sig":"MEUCIFuuRoydtyRmolc8Q0gDyXdH5RtlvXqhdIsLKzKMWNUVAiEAjPd+RMkdevoz96jrxJUvkIQsJEPTUujZwY+LhkMieX4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":67785,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdshioCRA9TVsSAnZWagAA3LsP/1PmkzOOof1MXQem8k8A\nyQ8Y6yxMfPnhVJV+t8pNtAubDIVdYPNNsJX1Zux/1jS0YNJ0My3gdE63aIaf\nDekqnJON6JtpSbSrUL3GjwYEQAB7BEA6XXbKiclyWBGVPdih+lgEFz6ZvN3N\n+ltfJ+ChEgDUzqhlyFBlXKcXV02Xh+w1D5tHFMBrlh1NZnPX2qxQZO8/AsBD\nKYZPx39tQz7HLgS4UYSr2m8q1j5YEj27q3VDt4n3ZXOiKqsx45cMR0kZ2Aw1\ntiFQLQoVJobKaklOt5dlVydOJqYRR9UMg+O0JdW/8GGdmjiCpEtDowk6UM07\n5kYOBFqZWgrw796TWAhZGRpAyCV8IwG7ZorZe2i2PW3cinkfWodA4vHFmkda\nzf01lrKkRdkLzegnL9qloEjJFrfdRQSVd7ldPvT6s17YeDWuA1GG/jImVP1l\nJm21lEzmvAzmKo3m3/+smBk2eyT+NzrnjgvrSIXZ3mDavUt07kfC4AnXk7Zw\nh+uaz76aVlP9F1bkbLmJcMDGWwEkMwmxcPQXy3FQFLR2kQ+zcjkAahXV6LCm\nSY5sKwy0TfjPyoJAcFfFF6yN2jKWjRzQJc7w+lITgpE5fLpipGUeB83ivEhV\ntvXc9O1Ybj64gVcIa4EqdjZXWqD3mG5dJ3hfm6NWkLTguYhQLXWh8iAbXoxy\nPZ0o\r\n=QGbl\r\n-----END PGP SIGNATURE-----\r\n","size":20903,"noattachment":false,"key":"/simplebar-react/-/simplebar-react-2.0.4-corejs2.tgz"},"main":"dist/simplebar-react.js","types":"dist/simplebar-react.d.ts","module":"dist/simplebar-react.esm.js","readme":"<p align=\"center\">\n  <img src=\"https://user-images.githubusercontent.com/527559/66231995-3cd0c380-e6be-11e9-8782-c50c834aac93.png\" width=\"570\" alt=\"SimpleBar\" />\n</p>\n<br/>\n<p align=\"center\" style=\"margin: 40px;\">\n  <a href=\"https://npmjs.org/package/simplebar-react\"><img alt=\"NPM version\" src=\"https://img.shields.io/npm/v/simplebar-react.svg?style=flat-square\" /></a>\n  <a href=\"https://npmjs.org/package/simplebar-react\"><img alt=\"NPM downloads\" src=\"https://img.shields.io/npm/dm/simplebar-react.svg?style=flat-square\"></a>\n  <a href=\"https://travis-ci.org/grsmto/simplebar\"><img alt=\"Build Status\" src=\"https://img.shields.io/travis/grsmto/simplebar/master.svg?style=flat-square\" /></a>\n  <a href=\"https://automate.browserstack.com/public-build/amtTU2pEa1FjNmpabTBCbUh2b3FpbFZQaXhNd1Q3bEg0L1dlSzd2SGN2Zz0tLWpjK1ZwWWRNWnVGQWI4OXphWGRISEE9PQ==--39b14340be576db5bd01b020627cd17414003bfb%\"><img src='https://automate.browserstack.com/badge.svg?badge_key=amtTU2pEa1FjNmpabTBCbUh2b3FpbFZQaXhNd1Q3bEg0L1dlSzd2SGN2Zz0tLWpjK1ZwWWRNWnVGQWI4OXphWGRISEE9PQ==--39b14340be576db5bd01b020627cd17414003bfb%'/></a>\n</p>\n<br/>\n\n# SimplebarReact\n\n### Installation\n\n**- Via npm**\n`npm install simplebar-react --save`\n\n**- Via Yarn**\n`yarn add simplebar-react`\n\nIf you are using Gatsby, please see [#345](https://github.com/Grsmto/simplebar/issues/345).\n\n### Usage\n\nCheck out the [Demo project](https://github.com/Grsmto/simplebar/blob/master/examples/react/src/App.js) or our live [Codesandbox example](https://codesandbox.io/s/simplebar-react-gwgyw).\n\nIf you are using a module loader (like Webpack) you first need to load SimpleBar:\n\n```js\nimport SimpleBar from 'simplebar-react';\nimport 'simplebar/dist/simplebar.min.css';\n\nconst App = () => (\n  <SimpleBar style={{ maxHeight: 300 }}>// your content</SimpleBar>\n);\n```\n\n**Don't forget to import both css and js in your project!**\n\n### :warning: Warning!\n\nSimpleBar is **not intended to be used on the `body` element!** I don't recommend wrapping your entire web page inside a custom scroll as it will often badly affect the user experience (slower scroll performance compared to the native body scroll, no native scroll behaviours like click on track, etc.). Do it at your own risk! SimpleBar is meant to improve the experience of **internal web page scrolling**; such as a chat box or a small scrolling area. **Please read the [caveats](#5-caveats) section first to be aware of the limitations!**\n\n### Troubleshooting\n\nIf you are experiencing issues when setting up SimpleBar, it is most likely because your styles are clashing with SimpleBar ones. Make sure the element you are setting SimpleBar on does not override any SimpleBar css properties! **We recommend to not style that element at all and use an inner element instead.**\n\n### Sponsors\n\nThanks to BrowserStack for sponsoring open source projects and letting us test SimpleBar for free.\n<a href=\"https://www.browserstack.com\" target=\"_blank\">\n<img src=\"https://user-images.githubusercontent.com/15015324/45184727-368fbf80-b1fe-11e8-8827-08dbc80b0fb1.png\" width=\"200\">\n</a>\n\n1. [Documentation](#1-documentation)\n\n## 1. Documentation\n\n### Passing options\n\nFind the list of available options on [the core documentation](https://github.com/Grsmto/simplebar/blob/master/packages/simplebar/README.md#options).\n\n```js\n<SimpleBar forceVisible=\"y\" autoHide=\"false\">\n  // your content\n</SimpleBar>\n```\n\n### Extra options\n\n#### scrollableNodeProps\n\nYou can pass props to the underlying scrollable `div` element. This is useful for example to get a `ref` of it, if you want to access the `scroll` event or apply imperative directive (like scrolling SimpleBar to the bottom, etc.).\n\n```js\nconst scrollableNodeRef = React.createRef();\n\n<SimpleBar scrollableNodeProps={{ ref: scrollableNodeRef }}>\n  // your content\n</SimpleBar>\n```\n\n### Accessing SimpleBar instance\n\nYou can pass a ref to the SimpleBar element: \n\n```js\nconst ref = useRef();\n\nuseEffect(() => {\n  ref.current.recalculate();\n  console.log(ref.current.el); // <- the root element you applied SimpleBar on\n})\n\n<SimpleBar ref={ref}>\n  // your content\n</SimpleBar>\n```\n\n### Accessing refs\n\nFor advanced usage, you can access refs of the scrollable and content nodes by using a render prop pattern:\n\n```js\n<SimpleBar>\n  {({ scrollableNodeRef, contentNodeRef }) => {\n    // Now you have access to scrollable and content nodes\n    return <div></div>;\n  }}\n</SimpleBar>\n```\n","scripts":{"dev":"rollup -c -w","test":"jest","build":"rollup -c && cp simplebar-react.d.ts dist/simplebar-react.d.ts","version":"yarn build","precommit":"lint-staged"},"_npmUser":{"name":"grsmto","email":"oi@adriendenat.com"},"repository":{"url":"git+https://github.com/grsmto/simplebar.git","type":"git","directory":"packages/simplebar-react"},"_npmVersion":"6.9.0","description":"React component for SimpleBar","directories":{},"lint-staged":{"*.{js,jsx,json}":["prettier-eslint --write","git add"]},"_nodeVersion":"10.16.3","dependencies":{"simplebar":"^5.0.3-corejs2","prop-types":"^15.6.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"@testing-library/react":"^9.2.0","@testing-library/jest-dom":"^4.1.0"},"peerDependencies":{"react":"^0.14.9 || ^15.3.0 || ^16.0.0-rc || ^16.0","react-dom":"^0.14.9 || ^15.3.0 || ^16.0.0-rc || ^16.0"},"_npmOperationalInternal":{"tmp":"tmp/simplebar-react_2.0.4-corejs2_1571952807952_0.19896953945260698","host":"s3://npm-registry-packages"},"publish_time":1571952808124,"_cnpm_publish_time":1571952808124,"dist-tags":{"beta":"3.0.0-beta.12","corejs2":"2.0.7-corejs2","latest":"3.3.2"}}