Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/malte-wessel/react-custom-scrollbars
React scrollbars component
https://github.com/malte-wessel/react-custom-scrollbars
customizable react scrollbars scrolling
Last synced: 4 days ago
JSON representation
React scrollbars component
- Host: GitHub
- URL: https://github.com/malte-wessel/react-custom-scrollbars
- Owner: malte-wessel
- License: mit
- Created: 2015-08-07T11:53:56.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2024-03-01T09:47:44.000Z (11 months ago)
- Last Synced: 2024-10-29T15:03:58.733Z (2 months ago)
- Topics: customizable, react, scrollbars, scrolling
- Language: JavaScript
- Homepage: http://malte-wessel.github.io/react-custom-scrollbars/
- Size: 1.12 MB
- Stars: 3,202
- Watchers: 30
- Forks: 578
- Open Issues: 219
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.md
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
- awesome-react-components-all - react-custom-scrollbars - React scrollbars component. (Uncategorized / Uncategorized)
- awesome-web - react-custom-scrollbars
- awesome-list - react-custom-scrollbars - React scrollbars component. (Demos / Custom Scrollbar)
README
react-custom-scrollbars
=========================[![npm](https://img.shields.io/badge/npm-react--custom--scrollbars-brightgreen.svg?style=flat-square)]()
[![npm version](https://img.shields.io/npm/v/react-custom-scrollbars.svg?style=flat-square)](https://www.npmjs.com/package/react-custom-scrollbars)
[![npm downloads](https://img.shields.io/npm/dm/react-custom-scrollbars.svg?style=flat-square)](https://www.npmjs.com/package/react-custom-scrollbars)* frictionless native browser scrolling
* native scrollbars for mobile devices
* [fully customizable](https://github.com/malte-wessel/react-custom-scrollbars/blob/master/docs/customization.md)
* [auto hide](https://github.com/malte-wessel/react-custom-scrollbars/blob/master/docs/usage.md#auto-hide)
* [auto height](https://github.com/malte-wessel/react-custom-scrollbars/blob/master/docs/usage.md#auto-height)
* [universal](https://github.com/malte-wessel/react-custom-scrollbars/blob/master/docs/usage.md#universal-rendering) (runs on client & server)
* `requestAnimationFrame` for 60fps
* no extra stylesheets
* well tested, 100% code coverage**[Demos](http://malte-wessel.github.io/react-custom-scrollbars/) · [Documentation](https://github.com/malte-wessel/react-custom-scrollbars/tree/master/docs)**
## Installation
```bash
npm install react-custom-scrollbars --save
```This assumes that you’re using [npm](http://npmjs.com/) package manager with a module bundler like [Webpack](http://webpack.github.io) or [Browserify](http://browserify.org/) to consume [CommonJS modules](http://webpack.github.io/docs/commonjs.html).
If you don’t yet use [npm](http://npmjs.com/) or a modern module bundler, and would rather prefer a single-file [UMD](https://github.com/umdjs/umd) build that makes `ReactCustomScrollbars` available as a global object, you can grab a pre-built version from [unpkg](https://unpkg.com/[email protected]/dist/react-custom-scrollbars.js). We *don’t* recommend this approach for any serious application, as most of the libraries complementary to `react-custom-scrollbars` are only available on [npm](http://npmjs.com/).
## Usage
This is the minimal configuration. [Check out the Documentation for advanced usage](https://github.com/malte-wessel/react-custom-scrollbars/tree/master/docs).
```javascript
import { Scrollbars } from 'react-custom-scrollbars';class App extends Component {
render() {
return (
Some great content...
);
}
}
```The `` component is completely customizable. Check out the following code:
```javascript
import { Scrollbars } from 'react-custom-scrollbars';class CustomScrollbars extends Component {
render() {
return (
);
}
}
```All properties are documented in the [API docs](https://github.com/malte-wessel/react-custom-scrollbars/blob/master/docs/API.md)
## Examples
Run the simple example:
```bash
# Make sure that you've installed the dependencies
npm install
# Move to example directory
cd react-custom-scrollbars/examples/simple
npm install
npm start
```## Tests
```bash
# Make sure that you've installed the dependencies
npm install
# Run tests
npm test
```### Code Coverage
```bash
# Run code coverage. Results can be found in `./coverage`
npm run test:cov
```## License
MIT