@djx/scroller
v0.2.0
Published
A simple scroll handler with some features
Downloads
6
Readme
@djx/scroller
Scroller built with @smoovy/scroller
Installation
npm install --save @djx/scroller
Usage
Make sure you import the component somewehere in your application first:
import '@djx/scroller';
You can then use it like normal web components in your markup:
<djx-scroller intertia="0.095">
<div>Scrollable content</div>
<div>Scrollable content</div>
<div>Scrollable content</div>
<div>Scrollable content</div>
</djx-scroller>
Events
Name | Detail | Description ---- | ------ | ----------- scroll | Coordinate | Animated position virtual | Coordinate | Anticipated position
Properties
Name | Type | Description | Default | Required ---- | ---- | ----------- | ------- | -------- inertia | float | The lerp modifier for each cycle | 0.12 | No