0.0.17 • Published 6 years ago
@smoovy/scroller-shared v0.0.17
@smoovy/scroller-shared
Some base components for a basic scroller.
Installation
npm install --save @smoovy/scroller-sharedUsage
Choose the component you want to add to your scroller module and simply include it. E.g.:
import { MouseWheelInput } from '@smoovy/scroller-shared';Inputs
| Class | Config key | Options |
|---|---|---|
| MouseWheelInput | mouseWheel | target: HTMLElementmultiplier: numbermultiplierFirefox: number |
| TouchSwipeInput | touchSwipe | target: HTMLElementmultiplier: number |
Transformers
| Class | Config key | Options |
|---|---|---|
| ClampTransformer | clamp | - |
Outputs
| Class | Config key | Options |
|---|---|---|
| CssTransformOutput | cssTransform | sectionSelector: stringsectionPadding: numberfirefoxFix: boolean |
Modularity
To reduce the final bundle size even more, you can only import the components you're really using. E.g.:
import { MouseWheelInput } from '@smoovy/scroller-shared/m/inputs/mouse-wheel-input';Development commands
// Serve with parcel
npm run serve
// Build with rollup
npm run build
// Run Jest unit tests
npm run test
// Run TSLinter
npm run lintLicense
See the LICENSE file for license rights and limitations (MIT).