├── .gitignore ├── .storybook └── config.js ├── LICENSE ├── README.md ├── _config.yml ├── demo ├── demo.dist.js ├── demo.js └── index.html ├── dist └── reactAwesomeScroll.js ├── index.js ├── package.json ├── src └── Scroll │ ├── Scroll.jsx │ └── styles.js ├── stories └── index.js ├── webpack.config.js └── yarn.lock /.gitignore: -------------------------------------------------------------------------------- 1 | .idea 2 | .DS_Store 3 | 4 | node_modules/ 5 | -------------------------------------------------------------------------------- /.storybook/config.js: -------------------------------------------------------------------------------- 1 | import { configure } from '@storybook/react'; 2 | 3 | function loadStories() { 4 | require('../stories/index.js'); 5 | // You can require as many stories as you need. 6 | } 7 | 8 | configure(loadStories, module); -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2016 BananaBobby 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # react-awesome-scroll 2 | 3 | [](https://bananabobby.github.io/react-awesome-scroll/) 4 | [](https://www.npmjs.com/package/react-awesome-scroll) 5 | 6 | - Custom styled scrollbar with exact native behavior. 7 | - Easily customisable 8 | - No external dependencies 9 | - Has 2 style presets out of the box: You can use it out of box or just with the styles needed for component to scroll content properly. (Or disable all of the styles and add them manually in your project stylesheet system). 10 | 11 | [**Demo**](https://bananabobby.github.io/react-awesome-scroll/demo/) 12 | 13 | ## Installation 14 | 15 | ### npm 16 | ```bash 17 | npm install react-awesome-scroll --save 18 | ``` 19 | 20 | ### yarn 21 | ```bash 22 | yarn add react-awesome-scroll 23 | ``` 24 | 25 | ## Usage 26 | 27 | ### Basic 28 | 29 | In order to use the component with it out-of-the-box design, you'll need to just call the component in your React app. 30 | You will also need to limit the height of its wrapper, so that the component can get its size limits. 31 | 32 | ```javascript 33 | import Scroll from 'react-awesome-scroll'; 34 | 35 | class CustomScroll extends Component { 36 | // Contains demo wrapper 37 | render() { 38 | return ( 39 |