Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 1,000,000+ packages pre-installed, including @smoovy/scroller-shared with all npm packages installed. Try it out:

var scrollerShared = require("@smoovy/scroller-shared")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

@smoovy/scroller-shared v0.0.17

Scroller shared components

@smoovy/scroller-shared

Version Size

Some base components for a basic scroller.

Installation

npm install --save @smoovy/scroller-shared

Usage

Choose the component you want to add to your scroller module and simply include it. E.g.:

import { MouseWheelInput } from '@smoovy/scroller-shared';

Inputs

ClassConfig keyOptions
MouseWheelInputmouseWheeltarget: HTMLElement
multiplier: number
multiplierFirefox: number
TouchSwipeInputtouchSwipetarget: HTMLElement
multiplier: number

Transformers

ClassConfig keyOptions
ClampTransformerclamp-

Outputs

ClassConfig keyOptions
CssTransformOutputcssTransformsectionSelector: string
sectionPadding: number
firefoxFix: 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 lint

License

See the LICENSE file for license rights and limitations (MIT).

RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free