-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathREADME.md~
executable file
·65 lines (59 loc) · 1.4 KB
/
README.md~
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# React-Scrollify
>React-Scrollify is a react component to make your native scrollbars beautiful.
### Quick Install
```sh
$ npm install react-scrollify
```
### How to use it
#### ES6
```javascript
import ReactScrollify from 'react-scrollify';
```
#### ES5
```javascript
var React = require('react');
var ReactScrollify = require('react-scrollify');
class App extends React.Component {
constructor(props) {
super(props);
}
render() {
return (
<ReactScrollify width="300">
<div style={{width: '600px', height: '500px'}}>Your Content Here</div>
</ReactScrollify>
);
}
}
export default App;
```
That's it.
### Options
```json
{
"containerClass": "",
"width": 200,
"height": 200,
"wheelSpeed": 1,
"wheelPropagation": false,
"swipePropagation": false,
"minScrollbarLength": null,
"maxScrollbarLength": null,
"useBothWheelAxes": false,
"suppressScrollX": false,
"suppressScrollY": false,
"scrollXMarginOffset": 0,
"scrollYMarginOffset": 0,
"theme": "default",
"onScrollX": function(){},
"onScrollY": function(){},
"onScrollUp": function(){},
"onScrollDown": function(){},
"onScrollLeft": function(){},
"onScrollRight": function(){},
"onScrollXReachStart": function(){},
"onScrollXReachEnd": function(){},
"onScrollYReachStart": function(){},
"onScrollYReachEnd": function(){}
}
```