0.2.0 • Published 2 years ago
@djx/scroller v0.2.0
@djx/scroller
Scroller built with @smoovy/scroller
Installation
npm install --save @djx/scrollerUsage
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 |